/tools/tradefederation/core/src/com/android/tradefed/util/ |
D | GCSBucketUtil.java | 161 List<String> command = new ArrayList<>(); in copy() local 163 command.add(GSUTIL); in copy() 166 command.add(FLAG_PARALLEL); in copy() 169 command.add(CMD_COPY); in copy() 172 command.add(FLAG_RECURSIVE); in copy() 176 command.add(FLAG_NO_CLOBBER); in copy() 179 command.add(source); in copy() 180 command.add(dest); in copy() 182 String[] commandAsStr = command.toArray(new String[0]); in copy() 271 List<String> command = new ArrayList<>(); in makeBucket() local [all …]
|
D | SimplePerfUtil.java | 93 public SimplePerfResult executeCommand(String command) throws DeviceNotAvailableException { in executeCommand() argument 94 String output = mDevice.executeShellCommand(commandStringPreparer(command)); in executeCommand() 109 public void executeCommand(String command, IShellOutputReceiver receiver) in executeCommand() argument 111 mDevice.executeShellCommand(commandStringPreparer(command), receiver); in executeCommand() 131 public void executeCommand(String command, IShellOutputReceiver receiver, in executeCommand() argument 134 mDevice.executeShellCommand(commandStringPreparer(command), receiver, in executeCommand() 138 protected String commandStringPreparer(String command) { in commandStringPreparer() argument 139 if (command == null) { in commandStringPreparer() 140 command = ""; in commandStringPreparer() 142 return commandPrependPreparer().toString() + command; in commandStringPreparer()
|
/tools/tradefederation/core/common_util/com/android/tradefed/util/ |
D | RunUtil.java | 20 import com.android.tradefed.command.CommandInterrupter; 145 public CommandResult runTimedCmd(final long timeout, final String... command) { in runTimedCmd() argument 146 return runTimedCmd(timeout, null, null, command); in runTimedCmd() 154 OutputStream stderr, final String... command) { in runTimedCmd() argument 155 RunnableResult osRunnable = createRunnableResult(stdout, stderr, command); in runTimedCmd() 168 OutputStream stdout, OutputStream stderr, String... command) { in createRunnableResult() argument 171 createProcessBuilder(command), in createRunnableResult() 181 long timeout, long retryInterval, int attempts, String... command) { in runTimedCmdRetry() argument 185 result = runTimedCmd(timeout, command); in runTimedCmdRetry() 195 private synchronized ProcessBuilder createProcessBuilder(String... command) { in createProcessBuilder() argument [all …]
|
D | IRunUtil.java | 107 public CommandResult runTimedCmd(final long timeout, final String... command); in runTimedCmd() argument 121 final long timeout, OutputStream stdout, OutputStream stderr, final String... command); in runTimedCmd() argument 134 int attempts, final String... command); in runTimedCmdRetry() argument 145 public CommandResult runTimedCmdSilently(final long timeout, final String... command); in runTimedCmdSilently() argument 159 int attempts, final String... command); in runTimedCmdSilentlyRetry() argument 170 CommandResult runTimedCmdWithInput(long timeout, String input, String... command); in runTimedCmdWithInput() argument 181 CommandResult runTimedCmdWithInput(long timeout, String input, List<String> command); in runTimedCmdWithInput() argument 194 long timeout, @Nullable File inputRedirect, String... command); in runTimedCmdWithInputRedirect() argument 205 public Process runCmdInBackground(String... command) throws IOException; in runCmdInBackground() argument 217 public Process runCmdInBackground(Redirect redirect, final String... command) in runCmdInBackground() argument [all …]
|
/tools/test/openhst/ |
D | stress_test.py | 199 def __init__(self, name, command, output, events, argument 218 self.command = command 257 logging.info("Restarting process %s", "".join(str(self.command))) 268 self.process = pexpect.spawn(" ".join(self.command), timeout=None) 271 self.process = subprocess.Popen(self.command, stdout=subprocess.PIPE) 409 command = [ 412 command.extend(["%s:S" % tag for tag in config.tag_to_suppress]) 415 command = [ 423 name, command, os.path.join( 434 command = shlex.split( [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/device/ |
D | TestDeviceTest.java | 263 private void setExecuteAdbCommandExpectations(CommandResult result, String command) in setExecuteAdbCommandExpectations() argument 267 EasyMock.eq(command))).andReturn(result); in setExecuteAdbCommandExpectations() 2704 public String executeShellCommand(String command) throws DeviceNotAvailableException { in testCreateUserFlags() 2717 public String executeShellCommand(String command) throws DeviceNotAvailableException { in testCreateUser_wrongOutput() 2761 public String executeShellCommand(String command) in testCreateUserNoThrow_wrongOutput() 3035 public String executeShellCommand(String command) throws DeviceNotAvailableException { in testGetCurrentUser() 3060 public String executeShellCommand(String command) throws DeviceNotAvailableException { in testGetCurrentUser_invalid() 3106 public String executeShellCommand(String command) throws DeviceNotAvailableException { in testGetUserFlag() 3126 public String executeShellCommand(String command) throws DeviceNotAvailableException { in testGetUserFlag_emptyReturn() 3145 public String executeShellCommand(String command) throws DeviceNotAvailableException { in testGetUserFlag_multiUser() [all …]
|
D | NativeDeviceTest.java | 39 import com.android.tradefed.command.remote.DeviceDescriptor; 352 public String executeShellCommand(String command) in testPullDir_nothingToDo() 396 public String executeShellCommand(String command) in testPullDir() 465 public String executeShellCommand(String command) in testPullDir_pullFail() 536 public String executeShellCommand(String command) in testPullDir_invalidPath() 1126 String command, IShellOutputReceiver receiver, in testGetBugreport_deviceUnavail() 1152 String command, in testGetBugreport_compatibility_deviceUnavail() 1183 String command, in testGetBugreport_deviceUnavail_fallback() 1233 String command, in testGetBugreportz() 1815 public String executeShellCommand(String command) throws DeviceNotAvailableException { in testUnlockDevice() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/cluster/ |
D | ClusterCommandTest.java | 42 ClusterCommand command = ClusterCommand.fromJson(json); in testFromJson_withAssignedAttemptId() local 44 assertEquals(REQUEST_ID, command.getRequestId()); in testFromJson_withAssignedAttemptId() 45 assertEquals(COMMAND_ID, command.getCommandId()); in testFromJson_withAssignedAttemptId() 46 assertEquals(TASK_ID, command.getTaskId()); in testFromJson_withAssignedAttemptId() 47 assertEquals(COMMAND_LINE, command.getCommandLine()); in testFromJson_withAssignedAttemptId() 48 assertEquals("attempt_id", command.getAttemptId()); in testFromJson_withAssignedAttemptId() 55 ClusterCommand command = ClusterCommand.fromJson(json); in testFromJson_withoutAssignedAttemptId() local 57 assertEquals(REQUEST_ID, command.getRequestId()); in testFromJson_withoutAssignedAttemptId() 58 assertEquals(COMMAND_ID, command.getCommandId()); in testFromJson_withoutAssignedAttemptId() 59 assertEquals(TASK_ID, command.getTaskId()); in testFromJson_withoutAssignedAttemptId() [all …]
|
D | ClusterCommandSchedulerTest.java | 31 import com.android.tradefed.command.CommandScheduler; 32 import com.android.tradefed.command.remote.DeviceDescriptor; 426 ClusterCommand command = commands.get(0); 427 assertEquals("1", command.getRequestId()); 428 assertEquals("2", command.getCommandId()); 429 assertEquals("3", command.getTaskId()); 430 assertEquals("4", command.getAttemptId()); 431 assertEquals("command line 1", command.getCommandLine()); 472 ClusterCommand command = commands.get(0); 473 assertEquals("1", command.getRequestId()); [all …]
|
/tools/tradefederation/contrib/src/com/android/performance/tests/ |
D | EmmcPerformanceTest.java | 146 String command = in runSequentialRead() local 149 runTest(SEQUENTIAL_READ_KEY, command, TestType.DD, true, iterations, listener, metrics); in runSequentialRead() 156 String command = in runSequentialWrite() local 159 runTest(SEQUENTIAL_WRITE_KEY, command, TestType.DD, false, iterations, listener, metrics); in runSequentialWrite() 167 String command = in runRandomRead() local 173 runTest(RANDOM_READ_KEY, command, TestType.RANDOM, true, iterations, listener, metrics); in runRandomRead() 180 String command = in runRandomWrite() local 186 runTest(RANDOM_WRITE_KEY, command, TestType.RANDOM, false, iterations, listener, metrics); in runRandomWrite() 203 String command, in runTest() argument 225 kbps = runDdIteration(command, simpleperfMetricsMap); in runTest() [all …]
|
/tools/test/connectivity/acts/framework/acts/libs/proc/ |
D | job.py | 70 command=[], argument 88 self.command = command 101 self.command, self._raw_stdout, self._raw_stderr, 106 def run(command, argument 135 proc = subprocess.Popen(command, 139 shell=not isinstance(command, list)) 151 result = Result(command=command, 161 logging.error("Command %s with %s timeout setting timed out", command, 171 def run_async(command, env=None): argument 189 proc = subprocess.Popen(command, [all …]
|
D | process.py | 50 def __init__(self, command, **kwargs): argument 57 if not kwargs.get('shell', False) and isinstance(command, str): 58 command = shlex.split(command) 59 self._command = command 222 def __start_process(command, **kwargs): argument 226 'Starting command "%s" with kwargs %s', command, kwargs) 227 return subprocess.Popen(command, **kwargs) 238 command = self._command 240 self._process = self.__start_process(command, 251 command) [all …]
|
/tools/test/connectivity/acts/framework/acts/controllers/buds_lib/ |
D | b29_lib.py | 110 command = '--serial={}'.format(self.port) 111 debug_bridge_process = self._send_command(command=command) 144 def _send_command(self, command): argument 152 '{} {} {}'.format(DEBUG_BRIDGE, '--rpc_port=-1', command), 170 command = '--serial=%s --debug_spi=dfu --sqif_partition=8' % self.port 171 debug_bridge_process = self._send_command(command=command) 192 command = '--serial={} --ping={}'.format(self.port, component) 193 debug_bridge_process = self._send_command(command=command) 213 command = '--serial={} --charger_reset'.format(self.port) 214 reset_charger_process = self._send_command(command=command)
|
/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/ |
D | RunCommandTargetPreparerTest.java | 71 final String command = "mkdir test"; in testSetUp() local 73 setter.setOptionValue("run-command", command); in testSetUp() 77 EasyMock.expect(mMockDevice.executeShellV2Command(EasyMock.eq(command))).andReturn(res); in testSetUp() 89 final String command = "mkdir test"; in testSetUp_withTimeout() local 91 setter.setOptionValue("run-command", command); in testSetUp_withTimeout() 98 EasyMock.eq(command), in testSetUp_withTimeout() 115 final String command = "mkdir test"; in testDisabled() local 117 setter.setOptionValue("run-command", command); in testDisabled() 130 final String command = "mkdir test"; in testTearDown() local 132 setter.setOptionValue("teardown-command", command); in testTearDown() [all …]
|
/tools/tradefederation/core/test_framework/com/android/tradefed/targetprep/ |
D | RunHostCommandTargetPreparer.java | 197 for (final String command : commands) { in runCommandList() 199 getRunUtil().runTimedCmd(mTimeout.toMillis(), command.split("\\s+")); in runCommandList() 204 command, result.getStdout()); in runCommandList() 210 command, result.getStdout(), result.getStderr()), in runCommandList() 214 String.format("Command %s timed out.", command), in runCommandList() 218 String.format("Exception occurred when running command %s.", command), in runCommandList() 233 String command = bgCommands.get(i); in runBgCommandList() local 234 CLog.d("About to run host background command: %s", command); in runBgCommandList() 238 Arrays.asList(command.split("\\s+")), in runBgCommandList() 241 CLog.e("Failed to run command: %s", command); in runBgCommandList() [all …]
|
/tools/tradefederation/contrib/src/com/android/uicd/tests/ |
D | UiConductorTest.java | 341 List<String> command = new ArrayList<>(); in getCommand() local 342 command.add("java"); in getCommand() 343 command.add("-jar"); in getCommand() 344 command.add(jarFile.getAbsolutePath()); in getCommand() 346 command.add(OPTION_SYMBOL + INPUT_OPTION_SHORT_NAME); in getCommand() 347 command.add(getTestFilesArgsForUicdBin(TESTS_RELATIVE_PATH, testFileName)); in getCommand() 350 command.add(OPTION_SYMBOL + OUTPUT_OPTION_SHORT_NAME); in getCommand() 351 command.add(getOutFilesArgsForUicdBin(OUTPUT_RELATIVE_PATH + "/" + testId)); in getCommand() 354 command.add(OPTION_SYMBOL + MODE_OPTION_SHORT_NAME); in getCommand() 355 command.add(getPlaymodeArgForUicdBin()); in getCommand() [all …]
|
/tools/tradefederation/core/src/com/android/tradefed/device/ |
D | TestDevice.java | 955 String command = "svc power reboot " + rebootMode.formatRebootCommand(reason); in doAdbFrameworkReboot() local 956 executeShellCommand(command); in doAdbFrameworkReboot() 1111 String command = LIST_PACKAGES_CMD; in getInstalledPackageNames() local 1113 command += String.format(" --user %s", userId); in getInstalledPackageNames() 1116 command += (" | grep " + packageNameSearched); in getInstalledPackageNames() 1118 String output = executeShellCommand(command); in getInstalledPackageNames() 1184 String command = "pm list users"; in tokenizeListUsers() local 1185 String commandOutput = executeShellCommand(command); in tokenizeListUsers() 1214 String command = "pm get-max-users"; in getMaxNumberOfUsersSupported() local 1215 String commandOutput = executeShellCommand(command); in getMaxNumberOfUsersSupported() [all …]
|
D | NativeDevice.java | 35 import com.android.tradefed.command.remote.DeviceDescriptor; 717 public void executeShellCommand(final String command, final IShellOutputReceiver receiver) in executeShellCommand() argument 723 getIDevice().executeShellCommand(command, receiver, in executeShellCommand() 728 performDeviceAction(String.format("shell %s", command), action, MAX_RETRY_ATTEMPTS); in executeShellCommand() 735 public void executeShellCommand(final String command, final IShellOutputReceiver receiver, in executeShellCommand() argument 742 getIDevice().executeShellCommand(command, receiver, in executeShellCommand() 747 performDeviceAction(String.format("shell %s", command), action, retryAttempts); in executeShellCommand() 753 final String command, in executeShellCommand() argument 768 command, in executeShellCommand() 776 performDeviceAction(String.format("shell %s", command), action, retryAttempts); in executeShellCommand() [all …]
|
/tools/test/connectivity/acts/framework/tests/controllers/sl4a_lib/ |
D | sl4a_manager_test.py | 207 command = 'ngo45hke3b4vie3mv5ni93,vfu3j' 208 sl4a_manager._SL4A_ROOT_FIND_PORT_CMD = command 211 self.assertEqual(manager._get_all_ports_command(), command) 222 command = 'ngo45hke3b4vie3mv5ni93,vfu3j' 223 sl4a_manager._SL4A_ROOT_FIND_PORT_CMD = command 226 self.assertEqual(manager._get_all_ports_command(), command) 237 command = 'ngo45hke3b4vie3mv5ni93,vfu3j' 238 sl4a_manager._SL4A_USER_FIND_PORT_CMD = command 241 self.assertEqual(manager._get_all_ports_command(), command) 418 def close(command): argument [all …]
|
/tools/tradefederation/core/src/com/android/tradefed/device/cloud/ |
D | LaunchCvdHelper.java | 46 List<String> command = new ArrayList<>(); in createSimpleDeviceCommand() local 47 command.add("sudo -u " + username); in createSimpleDeviceCommand() 48 command.add("/home/" + username + "/bin/launch_cvd"); in createSimpleDeviceCommand() 49 command.add("-data_policy"); in createSimpleDeviceCommand() 51 command.add("always_create"); in createSimpleDeviceCommand() 53 command.add("create_if_missing"); in createSimpleDeviceCommand() 56 command.add("-blank_data_image_mb"); in createSimpleDeviceCommand() 58 command.add("8000"); in createSimpleDeviceCommand() 60 command.add("-daemon"); in createSimpleDeviceCommand() 62 return command; in createSimpleDeviceCommand()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/util/ |
D | RunUtilTest.java | 28 import com.android.tradefed.command.CommandInterrupter; 86 OutputStream stdout, OutputStream stderr, String... command) { in createRunnableResult() argument 87 RunnableResult real = super.createRunnableResult(stdout, stderr, command); in createRunnableResult() 97 command[0]))) in createRunnableResult() 187 String[] command = {"sleep", "10000"}; in testRunTimedCmd_timeout() local 188 CommandResult result = mRunUtil.runTimedCmd(VERY_SHORT_TIMEOUT_MS, command); in testRunTimedCmd_timeout() 346 String[] command = {"unused", "cmd"}; in testRuntimedCmd_withFileOutputStream() local 348 spyUtil.runTimedCmd(LONG_TIMEOUT_MS, stdoutStream, stderrStream, command); in testRuntimedCmd_withFileOutputStream() 375 String[] command = {"unused", "cmd"}; in testRuntimedCmd_regularOutput_fileNull() local 376 CommandResult result = spyUtil.runTimedCmd(LONG_TIMEOUT_MS, null, null, command); in testRuntimedCmd_regularOutput_fileNull() [all …]
|
/tools/test/connectivity/acts/framework/acts/controllers/rohdeschwarz_lib/ |
D | contest.py | 374 command = data.decode() 377 command = re.sub('\r?\n$', '', command) 380 "client: {}".format(command)) 382 if command == self.AUTOMATION_DUT_ON: 388 elif command == self.AUTOMATION_DUT_OFF: 393 elif command.startswith(self.NOTIFICATION_TESTPLAN_START): 396 elif command.startswith(self.NOTIFICATION_TESTCASE_START): 399 elif command.startswith(self.NOTIFICATION_TESCASE_END): 402 elif command.startswith(self.NOTIFICATION_TESTPLAN_END): 406 self.log.error('Unhandled automation command: ' + command)
|
/tools/tradefederation/core/tests/src/com/android/tradefed/command/ |
D | ConsoleTest.java | 16 package com.android.tradefed.command; 24 import com.android.tradefed.command.Console.CaptureList; 217 String[] command = new String[] {"run", "command", "--arg", "value", "config.xml"}; in testRunCommand() local 226 Runnable runnable = trie.retrieve(captures, command); in testRunCommand() 227 assertNotNull(String.format("Console didn't match input %s", Arrays.toString(command)), in testRunCommand() 237 String[] command = new String[] {"run", "--arg", "value", "config.xml"}; in testRunCommand_shortcut() local 246 Runnable runnable = trie.retrieve(captures, command); in testRunCommand_shortcut() 247 assertNotNull(String.format("Console didn't match input %s", Arrays.toString(command)), in testRunCommand_shortcut() 260 String[] command = new String[] {"run", "command", "command", "--arg", "value", in testRunCommand_startsWithCommand() local 270 Runnable runnable = trie.retrieve(captures, command); in testRunCommand_startsWithCommand() [all …]
|
/tools/tradefederation/core/device_build_interfaces/com/android/tradefed/device/ |
D | INativeDevice.java | 23 import com.android.tradefed.command.remote.DeviceDescriptor; 255 public void executeShellCommand(String command, IShellOutputReceiver receiver) in executeShellCommand() argument 274 public void executeShellCommand(String command, IShellOutputReceiver receiver, in executeShellCommand() argument 297 String command, in executeShellCommand() argument 313 public String executeShellCommand(String command) throws DeviceNotAvailableException; in executeShellCommand() argument 324 public CommandResult executeShellV2Command(String command) throws DeviceNotAvailableException; in executeShellV2Command() argument 336 public CommandResult executeShellV2Command(String command, File pipeAsInput) in executeShellV2Command() argument 349 public CommandResult executeShellV2Command(String command, OutputStream pipeToOutput) in executeShellV2Command() argument 365 String command, final long maxTimeoutForCommand, final TimeUnit timeUnit) in executeShellV2Command() argument 384 String command, in executeShellV2Command() argument [all …]
|
/tools/test/connectivity/acts/framework/acts/controllers/utils_lib/ssh/ |
D | connection.py | 49 self.result.command, self.result.stdout, self.result.stderr) 154 command, argument 200 full_command = 'echo "CONNECTED: %s"; %s' % (identifier, command) 224 result = job.Result(command=result.command, 276 self.run(command, timeout, ignore_status, env, io_encoding, 280 def run_async(self, command, env=None): argument 301 command = '(%s) < /dev/null > /dev/null 2>&1 & echo -n $!' % command 302 result = self.run(command, env=env)
|