Home
last modified time | relevance | path

Searched refs:command (Results 1 – 25 of 165) sorted by relevance

1234567

/tools/tradefederation/core/src/com/android/tradefed/util/
DIRunUtil.java19 import com.android.tradefed.command.CommandScheduler;
87 public CommandResult runTimedCmd(final long timeout, final String... command); in runTimedCmd() argument
101 final long timeout, OutputStream stdout, OutputStream stderr, final String... command); in runTimedCmd() argument
114 int attempts, final String... command); in runTimedCmdRetry() argument
125 public CommandResult runTimedCmdSilently(final long timeout, final String... command); in runTimedCmdSilently() argument
139 int attempts, final String... command); in runTimedCmdSilentlyRetry() argument
150 CommandResult runTimedCmdWithInput(long timeout, String input, String... command); in runTimedCmdWithInput() argument
161 CommandResult runTimedCmdWithInput(long timeout, String input, List<String> command); in runTimedCmdWithInput() argument
172 public Process runCmdInBackground(String... command) throws IOException; in runCmdInBackground() argument
183 public Process runCmdInBackground(List<String> command) throws IOException; in runCmdInBackground() argument
[all …]
DSimplePerfUtil.java93 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()
DRunUtil.java130 public CommandResult runTimedCmd(final long timeout, final String... command) { in runTimedCmd() argument
131 return runTimedCmd(timeout, null, null, true, command); in runTimedCmd()
139 OutputStream stderr, final String... command) { in runTimedCmd() argument
140 return runTimedCmd(timeout, stdout, stderr, false, command); in runTimedCmd()
149 OutputStream stderr, boolean closeStreamAfterRun, final String... command) { in runTimedCmd() argument
152 createRunnableResult(result, stdout, stderr, closeStreamAfterRun, command); in runTimedCmd()
168 String... command) { in createRunnableResult() argument
170 result, null, createProcessBuilder(command), stdout, stderr, closeStreamAfterRun); in createRunnableResult()
176 long timeout, long retryInterval, int attempts, String... command) { in runTimedCmdRetry() argument
180 result = runTimedCmd(timeout, command); in runTimedCmdRetry()
[all …]
DCircularAtraceUtil.java70 String command = String.format(ATRACE_START_CMD, bufferSizeMB * KB_IN_MB, tagsString); in startTrace() local
71 CLog.d("Starting circular atrace utility with command: %s", command); in startTrace()
72 device.executeShellCommand(command); in startTrace()
91 String command = String.format(ATRACE_STOP_CMD, bufferSizeKB, DEVICE_FILE); in endTrace() local
92 CLog.d("Ending atrace utility with command: %s", command); in endTrace()
93 device.executeShellCommand(command); in endTrace()
DDeviceConcurrentUtil.java94 public ShellCommandCallable(ITestDevice device, String command, long timeout) { in ShellCommandCallable() argument
96 mCommand = command; in ShellCommandCallable()
101 public ShellCommandCallable<V> setCommand(String command) { in setCommand() argument
102 mCommand = command; in setCommand()
/tools/test/connectivity/acts/framework/acts/libs/proc/
Djob.py74 command=[], argument
92 self.command = command
105 self.command, self._raw_stdout, self._raw_stderr,
110 def run(command, argument
140 command,
144 shell=not isinstance(command, list))
157 command=command,
167 logging.error("Command %s with %s timeout setting timed out", command,
177 def run_async(command, env=None): argument
196 command,
[all …]
/tools/test/connectivity/tools/lab/utils/
Djob.py74 command=[], argument
92 self.command = command
105 self.command, self._raw_stdout, self._raw_stderr,
110 def run(command, argument
140 command,
144 shell=not isinstance(command, list))
157 command=command,
167 logging.error("Command %s with %s timeout setting timed out", command,
177 def run_async(command, env=None): argument
196 command,
[all …]
/tools/test/connectivity/acts/framework/acts/libs/ota/ota_tools/
Dota_tool_factory.py21 AdbSideloadOtaTool.__name__: lambda command: AdbSideloadOtaTool(command),
22 UpdateDeviceOtaTool.__name__: lambda command: UpdateDeviceOtaTool(command),
27 def create(ota_tool_class, command): argument
49 new_update_tool = _CONSTRUCTORS[ota_tool_class](command)
Dupdate_device_ota_tool.py35 def __init__(self, command): argument
36 super(UpdateDeviceOtaTool, self).__init__(command)
39 utils.unzip_maintain_permissions(self.command, self.unzip_path)
41 self.command = os.path.join(self.unzip_path, 'update_device.py')
47 self.command, ota_runner.serial, ota_runner.get_ota_package())
Dota_tool.py25 def __init__(self, command): argument
31 self.command = command
/tools/test/connectivity/acts/framework/tests/libs/ota/ota_tools/
Dota_tool_factory_test.py22 def __init__(self, command): argument
23 self.command = command
32 MockOtaTool.__name__: lambda command: MockOtaTool(command),
45 MockOtaTool.__name__: lambda command: MockOtaTool(command),
/tools/test/connectivity/acts/framework/acts/libs/ota/ota_runners/
Dota_runner_factory.py78 command = DEFAULT_OTA_COMMAND
80 command = config[ota_tool_class_name]
81 if type(command) is list:
83 if len(command) == 1:
84 command = command[0]
99 command)
106 command=DEFAULT_OTA_COMMAND, argument
123 ota_tool = ota_tool_factory.create(ota_tool_class_name, command)
/tools/tradefederation/core/src/com/android/tradefed/targetprep/
DRunHostCommandTargetPreparer.java186 for (final String command : commands) { in runCommandList()
187 final CommandResult result = getRunUtil().runTimedCmd(mTimeout, command.split("\\s+")); in runCommandList()
192 command, result.getStdout()); in runCommandList()
197 command, result.getStdout(), result.getStderr()); in runCommandList()
200 CLog.e("Command %s timed out.", command); in runCommandList()
203 CLog.e("Exception occurred when running command %s.", command); in runCommandList()
218 String command = bgCommands.get(i); in runBgCommandList() local
219 CLog.d("About to run host background command: %s", command); in runBgCommandList()
223 Arrays.asList(command.split("\\s+")), in runBgCommandList()
226 CLog.e("Failed to run command: %s", command); in runBgCommandList()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/
DRunCommandTargetPreparerTest.java67 final String command = "mkdir test"; in testSetUp() local
69 setter.setOptionValue("run-command", command); in testSetUp()
74 EasyMock.expect(mMockDevice.executeShellV2Command(EasyMock.eq(command))).andReturn(res); in testSetUp()
86 final String command = "mkdir test"; in testSetUp_withTimeout() local
88 setter.setOptionValue("run-command", command); in testSetUp_withTimeout()
96 EasyMock.eq(command), in testSetUp_withTimeout()
113 final String command = "mkdir test"; in testDisabled() local
115 setter.setOptionValue("run-command", command); in testDisabled()
129 final String command = "mkdir test"; in testTearDown() local
131 setter.setOptionValue("teardown-command", command); in testTearDown()
[all …]
DPreloadedClassesPreparerTest.java78 String[] command = String.format(WRITE_COMMAND, FAKE_TOOL_PATH, FAKE_FILE_PATH).split(" "); in testSetUp_RemoteSuccess() local
79 when(mMockRunUtil.runTimedCmd(PreloadedClassesPreparer.DEFAULT_TIMEOUT_MS, command)) in testSetUp_RemoteSuccess()
106 String[] command = String.format(WRITE_COMMAND, FAKE_TOOL_PATH, FAKE_FILE_PATH).split(" "); in testSetUp_LocalSuccess() local
107 when(mMockRunUtil.runTimedCmd(PreloadedClassesPreparer.DEFAULT_TIMEOUT_MS, command)) in testSetUp_LocalSuccess()
126 String[] command = String.format(WRITE_COMMAND, FAKE_TOOL_PATH, FAKE_FILE_PATH).split(" "); in testSetUp_WriteFailure() local
127 when(mMockRunUtil.runTimedCmd(PreloadedClassesPreparer.DEFAULT_TIMEOUT_MS, command)) in testSetUp_WriteFailure()
DRunHostCommandTargetPreparerTest.java71 final String command = "command \t\t\t \t argument " + DEVICE_SERIAL_PLACEHOLDER; in testSetUp() local
75 optionSetter.setOptionValue("host-setup-command", command); in testSetUp()
92 final String command = "command \t\t\t \t argument " + DEVICE_SERIAL_PLACEHOLDER; in testTearDown() local
96 optionSetter.setOptionValue("host-teardown-command", command); in testTearDown()
113 final String command = "command \t\t\t \t argument " + DEVICE_SERIAL; in testBgCommand() local
117 optionSetter.setOptionValue("host-background-command", command); in testBgCommand()
/tools/tradefederation/core/tests/src/com/android/tradefed/util/
DSimplePerfUtilTest.java46 String command = "ls -l"; in testCommandStringPreparerWithoutParams() local
47 String fullCommand = spu.commandStringPreparer(command); in testCommandStringPreparerWithoutParams()
48 Assert.assertEquals("simpleperf stat " + command, fullCommand); in testCommandStringPreparerWithoutParams()
53 String command = "sleep 10"; in testCommandStringPreparerWithParams() local
60 String fullCommand = spu.commandStringPreparer(command); in testCommandStringPreparerWithParams()
61 Assert.assertEquals("simpleperf record -e cpu-cycles:k --no-inherit perf.data " + command, in testCommandStringPreparerWithParams()
/tools/tradefederation/core/prod-tests/src/com/android/performance/tests/
DEmmcPerformanceTest.java145 String command = String.format("dd if=%s of=/dev/null bs=%d count=%d", mCache, BLOCK_SIZE, in runSequentialRead() local
147 runTest(SEQUENTIAL_READ_KEY, command, TestType.DD, true, iterations, listener, metrics); in runSequentialRead()
155 String command = String.format("dd if=/dev/zero of=%s bs=%d count=%d", mCache, BLOCK_SIZE, in runSequentialWrite() local
157 runTest(SEQUENTIAL_WRITE_KEY, command, TestType.DD, false, iterations, listener, metrics); in runSequentialWrite()
166 String command = String.format("%s -r %d %s", in runRandomRead() local
168 runTest(RANDOM_READ_KEY, command, TestType.RANDOM, true, iterations, listener, metrics); in runRandomRead()
176 String command = String.format("%s -w %d %s", in runRandomWrite() local
178 runTest(RANDOM_WRITE_KEY, command, TestType.RANDOM, false, iterations, listener, metrics); in runRandomWrite()
193 private void runTest(String testKey, String command, TestType type, boolean dropCache, in runTest() argument
211 kbps = runDdIteration(command, simpleperfMetricsMap); in runTest()
[all …]
/tools/acloud/public/
Dreport.py100 def __init__(self, command): argument
106 self.command = command
157 result = dict(command=self.command,
/tools/tradefederation/core/tests/src/com/android/tradefed/command/
DConsoleTest.java16 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/test/connectivity/acts/framework/acts/controllers/utils_lib/ssh/
Dconnection.py49 return 'cmd: %s\nstdout: %s\nstderr: %s' % (self.result.command,
151 command, argument
197 full_command = 'echo "CONNECTED: %s"; %s' % (identifier, command)
217 command=result.command,
268 self.run(command, timeout, ignore_status, env, io_encoding,
272 def run_async(self, command, env=None): argument
293 command = '(%s) < /dev/null > /dev/null 2>&1 & echo -n $!' % command
294 result = self.run(command, env=env)
Dformatter.py164 def format_remote_command(self, command, env): argument
186 execution_line = '%s %s;' % (env_str, command)
190 command,
208 remote_command = self.format_remote_command(command, env)
/tools/tradefederation/core/src/com/android/tradefed/suite/checker/
DSystemServerFileDescriptorChecker.java73 private static Integer getIntegerFromCommand(ITestDevice device, String command) in getIntegerFromCommand() argument
75 String output = device.executeShellCommand(command); in getIntegerFromCommand()
77 CLog.w("no shell output for command: " + command); in getIntegerFromCommand()
84 CLog.w("unable to parse result of '" + command + "' : " + output); in getIntegerFromCommand()
/tools/test/connectivity/acts/framework/acts/controllers/anritsu_lib/
D_anritsu_utils.py223 def __init__(self, error, command=None): argument
226 if command is not None:
228 command, self._error_message)
/tools/test/connectivity/acts/framework/tests/controllers/sl4a_lib/
Dsl4a_manager_test.py207 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 …]

1234567