/tools/tradefederation/core/javatests/com/android/tradefed/targetprep/ |
D | FeatureFlagTargetPreparerTest.java | 66 when(mDevice.executeShellV2Command(anyString())).thenReturn(mCommandResult); in setUp() 78 verify(mDevice).executeShellV2Command(eq("device_config list")); in testSetUpAndTearDown_oneFlagFile_newAndUpdatedFlags() 79 verify(mDevice).executeShellV2Command(eq("device_config put 'namespace' 'f' 'v1'")); in testSetUpAndTearDown_oneFlagFile_newAndUpdatedFlags() 80 verify(mDevice).executeShellV2Command(eq("device_config put 'namespace' 'f1' 'v1'")); in testSetUpAndTearDown_oneFlagFile_newAndUpdatedFlags() 87 verify(mDevice).executeShellV2Command(eq("device_config put 'namespace' 'f' 'v'")); in testSetUpAndTearDown_oneFlagFile_newAndUpdatedFlags() 88 verify(mDevice).executeShellV2Command(eq("device_config delete 'namespace' 'f1'")); in testSetUpAndTearDown_oneFlagFile_newAndUpdatedFlags() 100 verify(mDevice).executeShellV2Command(eq("device_config list")); in testSetUpAndTearDown_oneFlagFile_nullValueFlagInDeviceConfig() 101 verify(mDevice).executeShellV2Command(eq("device_config put 'namespace' 'f' 'v'")); in testSetUpAndTearDown_oneFlagFile_nullValueFlagInDeviceConfig() 108 verify(mDevice).executeShellV2Command(eq("device_config delete 'namespace' 'f'")); in testSetUpAndTearDown_oneFlagFile_nullValueFlagInDeviceConfig() 120 verify(mDevice).executeShellV2Command(eq("device_config list")); in testSetUpAndTearDown_oneFlagFile_nullValueFlagInFile() [all …]
|
D | DisableSELinuxTargetPreparerTest.java | 67 when(mMockDevice.executeShellV2Command(GETENFORCE)).thenReturn(result); in testSetUpSuccess_permissive() 71 verify(mMockDevice, times(1)).executeShellV2Command(GETENFORCE); in testSetUpSuccess_permissive() 79 when(mMockDevice.executeShellV2Command(GETENFORCE)).thenReturn(result); in testSetUpSuccess_enforced_rootBefore() 81 when(mMockDevice.executeShellV2Command(SETENFORCE + "0")).thenReturn(result); in testSetUpSuccess_enforced_rootBefore() 82 when(mMockDevice.executeShellV2Command(SETENFORCE + "1")).thenReturn(result); in testSetUpSuccess_enforced_rootBefore() 86 verify(mMockDevice, times(1)).executeShellV2Command(GETENFORCE); in testSetUpSuccess_enforced_rootBefore() 88 verify(mMockDevice, times(1)).executeShellV2Command(SETENFORCE + "0"); in testSetUpSuccess_enforced_rootBefore() 89 verify(mMockDevice, times(1)).executeShellV2Command(SETENFORCE + "1"); in testSetUpSuccess_enforced_rootBefore() 97 when(mMockDevice.executeShellV2Command(GETENFORCE)).thenReturn(result); in testSetUpSuccess_enforced_notRootBefore() 102 when(mMockDevice.executeShellV2Command(SETENFORCE + "0")).thenReturn(result); in testSetUpSuccess_enforced_notRootBefore() [all …]
|
D | ModulePusherTest.java | 108 when(mMockDevice.executeShellV2Command("ls /system/apex/")).thenReturn(apexCr); in setUp() 110 when(mMockDevice.executeShellV2Command("pm get-moduleinfo | grep 'com.google'")) in setUp() 112 when(mMockDevice.executeShellV2Command("cmd testharness enable")).thenReturn(cr); in setUp() 115 when(mMockDevice.executeShellV2Command("pm path " + APEX_PACKAGE_NAME)).thenReturn(cr1); in setUp() 118 when(mMockDevice.executeShellV2Command("pm path " + APK_PACKAGE_NAME)).thenReturn(cr2); in setUp() 124 when(mMockDevice.executeShellV2Command("pm path " + SPLIT_APK_PACKAGE_NAME)) in setUp() 130 when(mMockDevice.executeShellV2Command( in setUp() 191 when(mMockDevice.executeShellV2Command("ls /system/apex/")).thenReturn(apexCr); in testGetApexPathUnderSystem() 236 when(mMockDevice.executeShellV2Command("pm path " + APEX_PACKAGE_NAME)) in testGetPreLoadPathsOnQReturnDefault() 248 when(mMockDevice.executeShellV2Command("pm path " + APEX_PACKAGE_NAME)) in testGetPreLoadPathsOnSThrowsException() [all …]
|
D | RunCommandTargetPreparerTest.java | 89 when(mMockDevice.executeShellV2Command(Mockito.eq(command))).thenReturn(res); in testSetUp() 110 when(mMockDevice.executeShellV2Command( in testSetUp_withTimeout() 145 when(mMockDevice.executeShellV2Command(Mockito.eq(command))).thenReturn(result); in testTearDown() 163 when(mMockDevice.executeShellV2Command( in testTeardown_withTimeout() 185 when(mMockDevice.executeShellV2Command(actualCommand)).thenReturn(result); in testTeardown_withTestUserToken() 202 when(mMockDevice.executeShellV2Command(actualCommand)).thenReturn(result); in testTeardown_withTestUserToken_propertyNotSet() 378 when(mMockDevice.executeShellV2Command(actualCommand)).thenReturn(res); in testCmd_withTestUserToken_propertyNotSet() 399 when(mMockDevice.executeShellV2Command(actualCommand)).thenReturn(res); in testCmd_withTestUserToken()
|
D | InstallApexModuleTargetPreparerTest.java | 874 when(mMockDevice.executeShellV2Command("ls " + APEX_DATA_DIR)).thenReturn(res); in testSetupSuccess_noDataUnderApexDataDirs() 875 when(mMockDevice.executeShellV2Command("ls " + SESSION_DATA_DIR)).thenReturn(res); in testSetupSuccess_noDataUnderApexDataDirs() 876 when(mMockDevice.executeShellV2Command("ls " + STAGING_DATA_DIR)).thenReturn(res); in testSetupSuccess_noDataUnderApexDataDirs() 1345 when(mMockDevice.executeShellV2Command(PARENT_SESSION_CREATION_CMD)) in testSetupAndTearDown_ParentSessionCreationFail() 1377 when(mMockDevice.executeShellV2Command(PARENT_SESSION_CREATION_CMD)) in testSetupAndTearDown_ChildSessionCreationFail() 1381 when(mMockDevice.executeShellV2Command(CHILD_SESSION_CREATION_CMD_APEX)) in testSetupAndTearDown_ChildSessionCreationFail() 1383 when(mMockDevice.executeShellV2Command(CHILD_SESSION_CREATION_CMD_APK)) in testSetupAndTearDown_ChildSessionCreationFail() 1413 when(mMockDevice.executeShellV2Command(PARENT_SESSION_CREATION_CMD)) in testSetupAndTearDown_FileWrittenToSessionFail() 1415 when(mMockDevice.executeShellV2Command(CHILD_SESSION_CREATION_CMD_APEX)) in testSetupAndTearDown_FileWrittenToSessionFail() 1417 when(mMockDevice.executeShellV2Command(CHILD_SESSION_CREATION_CMD_APK)) in testSetupAndTearDown_FileWrittenToSessionFail() [all …]
|
/tools/tradefederation/core/javatests/com/android/tradefed/suite/checker/ |
D | FilesystemRootCheckerTest.java | 51 when(mMockDevice.executeShellV2Command(Mockito.eq(FilesystemRootChecker.FIND_ROOT_COMMAND))) in setup() 66 when(mMockDevice.executeShellV2Command(Mockito.eq(FilesystemRootChecker.FIND_ROOT_COMMAND))) in testNoRootFiles() 72 .executeShellV2Command(Mockito.eq(FilesystemRootChecker.FIND_ROOT_COMMAND)); in testNoRootFiles() 88 when(mMockDevice.executeShellV2Command(Mockito.eq(FilesystemRootChecker.FIND_ROOT_COMMAND))) in testRootFile() 93 .executeShellV2Command(Mockito.eq(FilesystemRootChecker.FIND_ROOT_COMMAND)); in testRootFile() 109 when(mMockDevice.executeShellV2Command(Mockito.eq(FilesystemRootChecker.FIND_ROOT_COMMAND))) in testRootDirectory() 114 .executeShellV2Command(Mockito.eq(FilesystemRootChecker.FIND_ROOT_COMMAND)); in testRootDirectory() 129 when(mMockDevice.executeShellV2Command(Mockito.eq(FilesystemRootChecker.FIND_ROOT_COMMAND))) in testModuleStartWithRootFile() 135 .executeShellV2Command(Mockito.eq(FilesystemRootChecker.FIND_ROOT_COMMAND)); in testModuleStartWithRootFile()
|
/tools/tradefederation/core/javatests/com/android/tradefed/testtype/ |
D | ArtRunTestTest.java | 192 when(mMockITestDevice.executeShellV2Command(mktempCmd, 10000L, TimeUnit.MILLISECONDS, 0)) in doTestRunSingleTest() 203 when(mMockITestDevice.executeShellV2Command(dalvikvmCmd, 60000L, TimeUnit.MILLISECONDS, 0)) in doTestRunSingleTest() 213 when(mMockITestDevice.executeShellV2Command( in doTestRunSingleTest() 219 when(mMockITestDevice.executeShellV2Command( in doTestRunSingleTest() 231 when(mMockITestDevice.executeShellV2Command( in doTestRunSingleTest() 237 when(mMockITestDevice.executeShellV2Command( in doTestRunSingleTest() 315 when(mMockITestDevice.executeShellV2Command(mktempCmd, 10000L, TimeUnit.MILLISECONDS, 0)) in testRunSingleTest_nonZeroExitCode() 326 when(mMockITestDevice.executeShellV2Command(dalvikvmCmd, 60000L, TimeUnit.MILLISECONDS, 0)) in testRunSingleTest_nonZeroExitCode() 336 when(mMockITestDevice.executeShellV2Command( in testRunSingleTest_nonZeroExitCode() 342 when(mMockITestDevice.executeShellV2Command( in testRunSingleTest_nonZeroExitCode() [all …]
|
D | GoogleBenchmarkTestTest.java | 115 when(mMockITestDevice.executeShellV2Command( in testRun() 122 when(mMockITestDevice.executeShellV2Command( in testRun() 132 .executeShellV2Command( in testRun() 138 .executeShellV2Command( in testRun() 197 when(mMockITestDevice.executeShellV2Command( in testRun_withSingleModuleName() 203 when(mMockITestDevice.executeShellV2Command( in testRun_withSingleModuleName() 218 .executeShellV2Command( in testRun_withSingleModuleName() 224 .executeShellV2Command( in testRun_withSingleModuleName() 257 when(mMockITestDevice.executeShellV2Command( in testRun_withMultipleModuleNames() 266 when(mMockITestDevice.executeShellV2Command( in testRun_withMultipleModuleNames() [all …]
|
/tools/tradefederation/core/javatests/com/android/tradefed/util/ |
D | NativeCodeCoverageFlusherTest.java | 77 when(mMockDevice.executeShellV2Command(anyString())).thenReturn(result); in testClearCoverageMeasurements_rmCommandCalled() 116 when(mMockDevice.executeShellV2Command(anyString())).thenReturn(result); in testFlushCoverageAllProcesses_flushAllCommandCalled() 139 when(mMockDevice.executeShellV2Command(anyString())).thenReturn(result); in testFlushCoverageSpecificProcesses_flushSpecificCommandCalled() 159 when(mMockDevice.executeShellV2Command(anyString())).thenReturn(result); in testFlushNotHandled_flushNotCalled() 178 when(mMockDevice.executeShellV2Command(anyString())).thenReturn(result); in testFlushStatusReadFailed_flushNotCalled() 198 when(mMockDevice.executeShellV2Command(anyString())).thenReturn(result); in testFlushStatusReadEmpty_flushNotCalled() 224 when(mMockDevice.executeShellV2Command(contains("123"))).thenReturn(resultNotHandled); in testFlushOnlySigCgt_flushSpecificProcesses() 225 when(mMockDevice.executeShellV2Command(contains("234"))).thenReturn(resultHandled); in testFlushOnlySigCgt_flushSpecificProcesses() 226 when(mMockDevice.executeShellV2Command(contains("456"))).thenReturn(resultEmpty); in testFlushOnlySigCgt_flushSpecificProcesses()
|
D | TargetFileUtilsTest.java | 87 .executeShellV2Command("find findPath -name \"namePattern\" option1 option2"); in testFindFile() 107 .executeShellV2Command("find findPath -name \"namePattern\""); in testFindFile_w_cmd_result_fail() 121 .executeShellV2Command("find findPath -name \"namePattern\""); in testFindFile_w_empty_line_stdout()
|
/tools/tradefederation/core/javatests/com/android/tradefed/targetprep/sync/ |
D | IncrementalImageFuncTest.java | 172 getDevice().executeShellV2Command("mkdir -p /data/ndb"); in testBlockCompareUpdate() 173 getDevice().executeShellV2Command("rm -rf /data/ndb/*.patch"); in testBlockCompareUpdate() 176 CommandResult whichOutput = getDevice().executeShellV2Command("which snapshotctl"); in testBlockCompareUpdate() 179 getDevice().executeShellV2Command("snapshotctl unmap-snapshots"); in testBlockCompareUpdate() 180 getDevice().executeShellV2Command("snapshotctl delete-snapshots"); in testBlockCompareUpdate() 209 getDevice().executeShellV2Command("snapshotctl map-snapshots /data/ndb/"); in testBlockCompareUpdate() 235 CommandResult psOutput = getDevice().executeShellV2Command("ps -ef | grep snapuserd"); in testBlockCompareUpdate() 320 CommandResult lsOutput = getDevice().executeShellV2Command("ls -l /dev/block/mapper/"); in listMappingAndCompare() 357 getDevice().executeShellV2Command("md5sum " + result.mountedBlock); in listMappingAndCompare() 380 getDevice().executeShellV2Command("snapshotctl revert-snapshots"); in revertToPreviousBuild()
|
/tools/tradefederation/core/test_framework/com/android/tradefed/targetprep/ |
D | DisableSELinuxTargetPreparer.java | 42 CommandResult result = device.executeShellV2Command("getenforce"); in setUp() 57 result = device.executeShellV2Command("setenforce 0"); in setUp() 78 device.executeShellV2Command("setenforce 1"); in tearDown()
|
/tools/tradefederation/core/javatests/com/android/tradefed/util/statsd/ |
D | ConfigUtilTest.java | 70 when(mTestDevice.executeShellV2Command(matches(STATS_CONFIG_UPDATE_MATCHER))) in testPushDeviceConfig() 83 verify(mTestDevice, times(1)).executeShellV2Command(matches(STATS_CONFIG_UPDATE_MATCHER)); in testPushDeviceConfig() 94 when(mTestDevice.executeShellV2Command(matches(STATS_CONFIG_UPDATE_MATCHER))) in testPushInvalidDeviceConfig() 120 when(mTestDevice.executeShellV2Command(matches(STATS_CONFIG_UPDATE_MATCHER))) in testPushBinaryDeviceConfig() 126 verify(mTestDevice, times(1)).executeShellV2Command(matches(STATS_CONFIG_UPDATE_MATCHER)); in testPushBinaryDeviceConfig()
|
/tools/tradefederation/core/javatests/com/android/tradefed/suite/checker/baseline/ |
D | CommandBaselineSetterTest.java | 63 when(mMockDevice.executeShellV2Command("input keyevent KEYCODE_HOME")) in setBaseline_setSucceeds_returnTrue() 71 when(mMockDevice.executeShellV2Command("input keyevent KEYCODE_HOME")) in setBaseline_setFails_returnFalse() 79 when(mMockDevice.executeShellV2Command("input keyevent KEYCODE_HOME")).thenReturn(null); in setBaseline_nullResult_returnFalse()
|
/tools/tradefederation/core/javatests/com/android/tradefed/device/contentprovider/ |
D | ContentProviderHandlerTest.java | 94 .executeShellV2Command( in testSetUp_install() 102 .executeShellV2Command( in testSetUp_install() 131 .executeShellV2Command( in testDeleteFile() 150 .executeShellV2Command( in testDeleteFile_fail() 168 .executeShellV2Command( in testError() 186 .executeShellV2Command( in testPushFile() 240 .executeShellV2Command(shellCommandCaptor.capture(), any(OutputStream.class)); in testPullFile_verifyShellCommand() 452 .executeShellV2Command(anyString(), any(OutputStream.class)); in mockPullFileSuccess()
|
/tools/tradefederation/core/javatests/com/android/tradefed/device/metric/ |
D | GcovKernelCodeCoverageCollectorTest.java | 148 when(mMockDevice.executeShellV2Command( in setUp() 157 when(mMockDevice.executeShellV2Command( in setUp() 162 when(mMockDevice.executeShellV2Command( in setUp() 169 when(mMockDevice.executeShellV2Command( in setUp() 176 when(mMockDevice.executeShellV2Command( in setUp() 289 when(mMockDevice.executeShellV2Command( in resetGcovCountsFail_noTar() 302 when(mMockDevice.executeShellV2Command( in makeTempDirFail_noTar() 315 when(mMockDevice.executeShellV2Command( in makeGcdaTempDirFail_noTar() 330 when(mMockDevice.executeShellV2Command( in copyGcovDataFail_noTar() 345 when(mMockDevice.executeShellV2Command( in tarGcovDataFail_noTar()
|
/tools/tradefederation/core/src/com/android/tradefed/targetprep/suite/ |
D | FoldableModePreparer.java | 56 CommandResult result = testInformation.getDevice().executeShellV2Command( in setUp() 65 result = testInformation.getDevice().executeShellV2Command("input keyevent KEYCODE_WAKEUP"); in setUp() 90 CommandResult result = testInformation.getDevice().executeShellV2Command( in tearDown()
|
/tools/tradefederation/core/src/com/android/tradefed/device/metric/ |
D | GcovKernelCodeCoverageCollector.java | 156 CommandResult result = device.executeShellV2Command(RESET_GCOV_COUNTS_COMMAND); in resetGcovCounts() 188 CommandResult result = device.executeShellV2Command(MAKE_TEMP_DIR_COMMAND); in collectGcovDebugfsCoverage() 201 result = device.executeShellV2Command(makeGcdaTempDirCommand); in collectGcovDebugfsCoverage() 214 result = device.executeShellV2Command(copyGcovDataCommand); in collectGcovDebugfsCoverage() 225 result = device.executeShellV2Command(tarCommand); in collectGcovDebugfsCoverage()
|
/tools/tradefederation/core/device_build_interfaces/com/android/tradefed/device/ |
D | INativeDevice.java | 327 public CommandResult executeShellV2Command(String command) throws DeviceNotAvailableException; in executeShellV2Command() method 339 public CommandResult executeShellV2Command(String command, File pipeAsInput) in executeShellV2Command() method 353 public CommandResult executeShellV2Command(String command, OutputStream pipeToOutput) in executeShellV2Command() method 368 public CommandResult executeShellV2Command( in executeShellV2Command() method 387 public CommandResult executeShellV2Command( in executeShellV2Command() method 411 public CommandResult executeShellV2Command( in executeShellV2Command() method 438 public CommandResult executeShellV2Command( in executeShellV2Command() method
|
/tools/tradefederation/core/src/com/android/tradefed/util/image/ |
D | IncrementalImageUtil.java | 261 CommandResult whichOutput = device.executeShellV2Command("which snapshotctl"); in isSnapshotSupported() 266 CommandResult helpOutput = device.executeShellV2Command("snapshotctl"); in isSnapshotSupported() 304 CommandResult dumpOutput = device.executeShellV2Command("snapshotctl dump"); in isSnapshotInUse() 374 mDevice.executeShellV2Command("mkdir -p /data/ndb"); in internalUpdateDevice() 375 mDevice.executeShellV2Command("rm -rf /data/ndb/*.patch"); in internalUpdateDevice() 377 mDevice.executeShellV2Command("snapshotctl unmap-snapshots"); in internalUpdateDevice() 378 mDevice.executeShellV2Command("snapshotctl delete-snapshots"); in internalUpdateDevice() 423 CommandResult listSnapshots = mDevice.executeShellV2Command("ls -l /data/ndb/"); in internalUpdateDevice() 428 mDevice.executeShellV2Command("snapshotctl apply-update /data/ndb/"); in internalUpdateDevice() 441 mDevice.executeShellV2Command("snapshotctl map-snapshots /data/ndb/"); in internalUpdateDevice() [all …]
|
/tools/tradefederation/core/src/com/android/tradefed/targetprep/ |
D | RunCommandTargetPreparer.java | 128 device.executeShellV2Command(cmd, mRunCmdTimeout, TimeUnit.MILLISECONDS, 0); in setUp() 130 result = device.executeShellV2Command(cmd); in setUp() 179 .executeShellV2Command( in tearDown() 182 result = getDevice(testInfo).executeShellV2Command(cmd); in tearDown()
|
D | ModulePusher.java | 241 String out = device.executeShellV2Command(GET_GOOGLE_MODULES).getStdout(); in checkPreloadModules() 356 String outputs = device.executeShellV2Command(GET_APEX_PACKAGE_VERSIONS).getStdout(); in getGooglePackageVersionCodesOnDevice() 361 outputs = device.executeShellV2Command(GET_APK_PACKAGE_VERSIONS).getStdout(); in getGooglePackageVersionCodesOnDevice() 453 device.executeShellV2Command(String.format("ls %s", dirPathOnDevice)); in isPackageDir() 474 String output = device.executeShellV2Command("pm path " + packageName).getStdout(); in getPathsOnDevice() 508 String outputs = device.executeShellV2Command(LS_SYSTEM_APEX).getStdout(); in getApexPaths() 566 device.executeShellV2Command(RM_PACKAGE_CACHE); in cleanPackageCache() 578 CommandResult cr = device.executeShellV2Command(ENABLE_TESTHARNESS); in reloadAllModules()
|
/tools/tradefederation/core/javatests/com/android/tradefed/device/ |
D | TestDeviceShellFuncTest.java | 118 mTestDevice.executeShellV2Command(String.format("ls %s", devicePath)); in testExecuteShellCommandV2_basic() 128 mTestDevice.executeShellV2Command(String.format("cat %s", devicePath)); in testExecuteShellCommandV2_basic() 151 CommandResult result = mTestDevice.executeShellV2Command("cat", input); in testExecuteShellCommand_pipeStdin()
|
/tools/tradefederation/core/src/com/android/tradefed/device/ |
D | WifiHelper.java | 216 CommandResult result = mDevice.executeShellV2Command(ENABLE_WIFI_CMD); in enableWifi() 230 mDevice.executeShellV2Command( in enableWifiV2() 444 mDevice.executeShellV2Command(String.format("cmd -w wifi status")); in isWifiEnabledV2() 525 mDevice.executeShellV2Command(String.format("cmd -w wifi status")); in getWifiInfoV2() 548 mDevice.executeShellV2Command(String.format("cmd -w wifi status")); in checkConnectivityV2() 634 CommandResult connectOutput = mDevice.executeShellV2Command(connectCmd); in connectToNetworkV2() 652 mDevice.executeShellV2Command("cmd -w wifi start-scan"); in getScanResults() 657 mDevice.executeShellV2Command(String.format("cmd -w wifi list-scan-results")); in getScanResults()
|
/tools/tradefederation/core/test_framework/com/android/tradefed/testtype/binary/ |
D | KUnitModuleTest.java | 109 getDevice().executeShellV2Command(String.format(RMMOD_COMMAND_FMT, kunitModule)); in runBinary() 133 .executeShellV2Command( in runBinary() 198 .executeShellV2Command(String.format(RMMOD_COMMAND_FMT, kunitModule)); in runBinary()
|