Home
last modified time | relevance | path

Searched refs:executeShellCommand (Results 1 – 25 of 42) sorted by relevance

12

/test/vts/harnesses/tradefed/tests/src/com/android/tradefed/util/
DCmdUtilTest.java70 doReturn("").when(mDevice).executeShellCommand(TEST_CMD); in testWaitCmdSuccess()
76 when(mDevice.executeShellCommand(TEST_CMD)).thenReturn("something").thenReturn(""); in testWaitCmdSuccessWithRetry()
82 doReturn("something").when(mDevice).executeShellCommand(TEST_CMD); in testWaitCmdSuccessFail()
88 doReturn("").when(mDevice).executeShellCommand(TEST_CMD); in testRetrySuccess()
90 verify(mDevice, times(1)).executeShellCommand(eq(RUN_CMD)); in testRetrySuccess()
95 when(mDevice.executeShellCommand(TEST_CMD)).thenReturn("something").thenReturn(""); in testRetrySuccessWithRetry()
97 verify(mDevice, times(2)).executeShellCommand(eq(RUN_CMD)); in testRetrySuccessWithRetry()
102 doReturn("something").when(mDevice).executeShellCommand(TEST_CMD); in testRetryFail()
104 verify(mDevice, times(CmdUtil.MAX_RETRY_COUNT)).executeShellCommand(eq(RUN_CMD)); in testRetryFail()
109 doReturn("").when(mDevice).executeShellCommand(TEST_CMD); in testRetryMultipleCommandsSuccess()
[all …]
/test/vts/harnesses/tradefed/tests/src/com/android/tradefed/targetprep/
DVtsDevicePreparerTest.java113 .executeShellCommand(eq("ps -g system | grep system_server")); in test_startFramework()
116 .executeShellCommand( in test_startFramework()
118 verify(mockDevice, times(1)).executeShellCommand(eq("start")); in test_startFramework()
129 verify(mockDevice, times(1)).executeShellCommand(eq("stop")); in test_stopFramework()
131 .executeShellCommand( in test_stopFramework()
144 .executeShellCommand( in test_startNativeServers()
157 .executeShellCommand( in test_stopNativeServers()
169 verify(mockDevice, times(1)).executeShellCommand(eq("setprop key value")); in test_setProp()
267 doReturn("system_server").when(mockDevice).executeShellCommand(contains("ps -g system")); in test_isFrameworkRunning_true()
280 doReturn("").when(mockDevice).executeShellCommand(contains("ps -g system")); in test_isFrameworkRunning_false()
[all …]
DVtsHalAdapterPreparerTest.java74 device.executeShellCommand(cmd); in retry()
82 device.executeShellCommand(cmd); in retry()
137 doReturn(output).doReturn("").when(mDevice).executeShellCommand( in testOnSetUpAdapterSingleInstance()
145 verify(mDevice, times(1)).executeShellCommand(eq(adapterCmd)); in testOnSetUpAdapterSingleInstance()
155 doReturn(output).doReturn("").when(mDevice).executeShellCommand( in testOnSetUpAdapterMultipleInstance()
171 verify(mDevice, times(1)).executeShellCommand(eq(cmd)); in testOnSetUpAdapterMultipleInstance()
189 doReturn("").when(mDevice).executeShellCommand( in testOnSetupServiceNotAvailable()
198 doReturn(output).when(mDevice).executeShellCommand( in testOnSetUpAdapterFailed()
DVtsTraceCollectPreparerTest.java139 EasyMock.expect(mMockDevice.executeShellCommand(EasyMock.eq("getenforce"))) in testOnSetUp()
142 EasyMock.expect(mMockDevice.executeShellCommand( in testOnSetUp()
176 EasyMock.expect(mMockDevice.executeShellCommand(EasyMock.eq("getenforce"))) in testOnTearDown()
178 EasyMock.expect(mMockDevice.executeShellCommand( in testOnTearDown()
/test/suite_harness/common/util/tests/src/com/android/compatibility/common/util/
DBackupUtilsTest.java56 protected InputStream executeShellCommand(String command) throws IOException { in testEnableBackup_whenEnableTrueAndEnabled_returnsTrue()
75 protected InputStream executeShellCommand(String command) throws IOException { in testEnableBackup_whenEnableTrueAndDisabled_returnsFalse()
94 protected InputStream executeShellCommand(String command) throws IOException { in testEnableBackup_whenEnableFalseAndEnabled_returnsTrue()
113 protected InputStream executeShellCommand(String command) throws IOException { in testEnableBackup_whenEnableFalseAndDisabled_returnsFalse()
133 protected InputStream executeShellCommand(String command) throws IOException { in testEnableBackup_whenEnableTrueAndEnabledAndCommandsReturnMultipleLines()
152 protected InputStream executeShellCommand(String command) throws IOException { in testEnableBackup_whenQueryCommandThrows_propagatesException()
180 protected InputStream executeShellCommand(String command) throws IOException { in testEnableBackup_whenSetCommandThrows_propagatesException()
209 protected InputStream executeShellCommand(String command) throws IOException { in testEnableBackup_whenQueryCommandReturnsInvalidString_throwsException()
237 protected InputStream executeShellCommand(String command) throws IOException { in testEnableBackup_whenQueryCommandReturnsEmptyString_throwsException()
264 protected InputStream executeShellCommand(String command) throws IOException { in testWaitForBackupInitialization_whenEnabled()
[all …]
/test/vts/harnesses/tradefed/src/com/android/tradefed/device/metric/
DVtsHalTraceCollector.java56 device.executeShellCommand("setenforce 0"); in onTestRunStart()
58 device.executeShellCommand(String.format("rm -rf %s/*.vts.trace", VTS_TMP_DIR)); in onTestRunStart()
59 device.executeShellCommand("chmod 777 " + VTS_TMP_DIR); in onTestRunStart()
60 device.executeShellCommand("chmod 777 " + VTS_TMP_LIB_DIR_32); in onTestRunStart()
61 device.executeShellCommand("chmod 777 " + VTS_TMP_LIB_DIR_64); in onTestRunStart()
62 device.executeShellCommand( in onTestRunStart()
81 device.executeShellCommand( in onTestRunEnd()
84 device.executeShellCommand(String.format("rm -rf %s/*.vts.trace", VTS_TMP_DIR)); in onTestRunEnd()
111 String out = device.executeShellCommand(String.format("ls %s/*.vts.trace", VTS_TMP_DIR)); in pullTraceFiles()
/test/suite_harness/common/util/src/com/android/compatibility/common/util/
DBackupUtils.java60 protected abstract InputStream executeShellCommand(String command) throws IOException; in executeShellCommand() method in BackupUtils
63 StreamUtil.drainAndClose(new InputStreamReader(executeShellCommand(command))); in executeShellCommandSync()
67 return StreamUtil.readInputStream(executeShellCommand(command)); in getShellCommandOutput()
156 return executeShellCommand("bmgr backupnow " + packageName); in backupNow()
164 return executeShellCommand( in backupNowForUser()
224 return executeShellCommand(String.format("bmgr restore %s %s", token, packageName)); in restore()
233 return executeShellCommand( in restoreForUser()
263 InputStream in = executeShellCommand(command); in executeShellCommandAndReturnOutput()
277 String output = getLineString(executeShellCommand("bmgr enabled")); in enableBackup()
285 executeShellCommand("bmgr enable " + enable); in enableBackup()
[all …]
DLogcatInspector.java25 protected abstract InputStream executeShellCommand(String command) throws IOException; in executeShellCommand() method in LogcatInspector
35 executeShellCommand("log -t " + tag + " " + uniqueString); in mark()
100 InputStream logcatStream = executeShellCommand("logcat -v brief -d " + filterSpec); in numberOfLogcatStringsFound()
/test/suite_harness/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/targetprep/
DSettingsPreparerTest.java64 EasyMock.expect(mMockDevice.executeShellCommand(SHELL_CMD_GET)).andReturn("\n3\n").once(); in testCorrectOneExpected()
71 EasyMock.expect(mMockDevice.executeShellCommand(SHELL_CMD_GET)).andReturn("\n3\n").once(); in testCorrectManyExpected()
81 EasyMock.expect(mMockDevice.executeShellCommand(SHELL_CMD_GET)).andReturn("\n0\n").once(); in testIncorrectOneExpected()
93 EasyMock.expect(mMockDevice.executeShellCommand(SHELL_CMD_GET)).andReturn("\n0\n").once(); in testIncorrectManyExpected()
108 EasyMock.expect(mMockDevice.executeShellCommand(SHELL_CMD_PUT_7)).andReturn("\n"); in testCommandRun()
115 EasyMock.expect(mMockDevice.executeShellCommand(SHELL_CMD_PUT_8)).andReturn("\n"); in testCommandRunWrongSetValue()
128 EasyMock.expect(mMockDevice.executeShellCommand(SHELL_CMD_GET)).andReturn("\n0\n").once(); in testIncorrectOneExpectedCommandRun()
129 EasyMock.expect(mMockDevice.executeShellCommand(SHELL_CMD_PUT_7)).andReturn("\n"); in testIncorrectOneExpectedCommandRun()
/test/vts/harnesses/tradefed/src/com/android/tradefed/targetprep/
DVtsTraceCollectPreparer.java108 mEnforcingState = device.executeShellCommand("getenforce"); in setUp()
112 device.executeShellCommand("setenforce " + SELINUX_PERMISSIVE); in setUp()
122 device.executeShellCommand("setenforce " + mEnforcingState); in tearDown()
170 device.executeShellCommand(String.format("rm -rf %s/*vts.profiler.so", VTS_TMP_LIB_DIR_32)); in removeProfilerLib()
171 device.executeShellCommand(String.format("rm -rf %s/*vts.profiler.so", VTS_TMP_LIB_DIR_64)); in removeProfilerLib()
172 device.executeShellCommand(String.format("rm -rf %s/libvts_*.so", VTS_TMP_LIB_DIR_32)); in removeProfilerLib()
173 device.executeShellCommand(String.format("rm -rf %s/libvts_*.so", VTS_TMP_LIB_DIR_64)); in removeProfilerLib()
174 device.executeShellCommand(String.format("rm %s/vts_profiling_configure", VTS_TMP_DIR)); in removeProfilerLib()
DVtsCoveragePreparer.java231 device.executeShellCommand(String.format("rm -rf %s/*", COVERAGE_DATA_PATH)); in setUp()
232 mEnforcingState = device.executeShellCommand("getenforce"); in setUp()
235 device.executeShellCommand("setenforce " + SELINUX_PERMISSIVE); in setUp()
254 device.executeShellCommand("setenforce " + mEnforcingState); in tearDown()
288 device.executeShellCommand("rm -rf " + COVERAGE_CONFIGURE_DST); in cleanupCoverageData()
289 device.executeShellCommand(String.format("rm -rf %s/*", COVERAGE_DATA_PATH)); in cleanupCoverageData()
DVtsDevicePreparer.java378 mDevice.executeShellCommand("start"); in startFramework()
428 mDevice.executeShellCommand("stop"); in stopFramework()
473 mDevice.executeShellCommand(String.format("setprop %s %s", key, value)); in setProperty()
496 return mDevice.executeShellCommand(cmd).contains("system_server"); in isFrameworkRunning()
/test/vts/harnesses/tradefed/src/com/android/tradefed/util/
DCmdUtil.java78 String out = device.executeShellCommand(cmd); in retry()
118 device.executeShellCommand(cmd); in retry()
141 String out = device.executeShellCommand(cmd); in validateCmdSuccess()
169 device.executeShellCommand("stop"); in restartFramework()
171 device.executeShellCommand("start"); in restartFramework()
186 device.executeShellCommand(String.format("getprop %s", name), receiver); in getSystemProperty()
200 device.executeShellCommand(String.format("setprop %s %s", name, value)); in setSystemProperty()
/test/vts/harnesses/tradefed/tests/src/com/android/tradefed/testtype/
DVtsMultiDeviceTestTest.java206 EasyMock.expect(mDevice.executeShellCommand(
209 EasyMock.expect(mDevice.executeShellCommand(
222 EasyMock.expect(mDevice.executeShellCommand(
225 EasyMock.expect(mDevice.executeShellCommand(
230 EasyMock.expect(mDevice.executeShellCommand("start")).andReturn("");
265 EasyMock.expect(mDevice.executeShellCommand(
268 EasyMock.expect(mDevice.executeShellCommand(
360 EasyMock.expect(mDevice.executeShellCommand(
363 EasyMock.expect(mDevice.executeShellCommand(
/test/suite_harness/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/
DSettingsPreparer.java99 String currentSettingValue = device.executeShellCommand(shellCmdGet).trim(); in run()
104 device.executeShellCommand(shellCmdPut); in run()
112 device.executeShellCommand(shellCmdPut); in run()
117 String currentSettingValue = device.executeShellCommand(shellCmdGet).trim(); in run()
DCrashReporter.java54 device.executeShellCommand( in upload()
68 device.executeShellCommand( in upload()
81 device.executeShellCommand("rm -rf " + CrashUtils.DEVICE_PATH); in setUp()
82 device.executeShellCommand("mkdir " + CrashUtils.DEVICE_PATH); in setUp()
DPackageDisabler.java43 device.executeShellCommand("pm disable-user " + mPackageName); in run()
DLocationCheck.java38 String adbFeatures = device.executeShellCommand("pm list features"); in hasLocationFeature()
/test/suite_harness/common/host-side/util/src/com/android/compatibility/common/util/
DBackupHostSideUtils.java39 protected InputStream executeShellCommand(String command) throws IOException { in createBackupUtils()
41 String result = device.executeShellCommand(command); in createBackupUtils()
DRootProcessScanner.java38 String lsOutput = device.executeShellCommand("ls -F /proc | grep /$"); // directories only in RootProcessScanner()
143 return mDevice.executeShellCommand(String.format("cat %s/statm", processDir)); in getProcessStatM()
195 return mDevice.executeShellCommand(String.format("cat %s/status", processDir)); in getProcessStatus()
DShellCommandUtil.java28 device.executeShellCommand(command); in execute()
DProtoUtils.java44 device.executeShellCommand(command, receiver); in getProto()
/test/vts/harnesses/tradefed/tests/src/com/android/tradefed/module/
DVtsHalAdapterModuleControllerTest.java67 doReturn(output).when(mDevice).executeShellCommand( in testShouldRun()
76 doReturn("").when(mDevice).executeShellCommand( in testShouldSkip()
/test/vts-testcase/kernel/api/sysfs/src/com/android/tests/sysfs/
DKernelApiSysfsTest.java170 String output = getDevice().executeShellCommand( in findFiles()
216 getDevice().executeShellCommand(String.format("echo %s > %s", lockName, wakeLockPath)); in testWakeLock()
225 getDevice().executeShellCommand(String.format("echo %s > %s", lockName, wakeUnLockPath)); in testWakeLock()
/test/vts/harnesses/tradefed/src/com/android/tradefed/module/
DVtsHalAdapterModuleController.java48 String out = device.executeShellCommand(String.format(LIST_HAL_CMD, mPackageName)); in shouldRun()

12