/tools/tradefederation/core/prod-tests/src/com/android/framework/tests/ |
D | PackageManagerOTATestUtils.java | 44 private ITestDevice mDevice = null; field in PackageManagerOTATestUtils 54 mDevice = device; in PackageManagerOTATestUtils() 64 File prop = mDevice.pullFile("/data/local.prop"); in wipeDevice() 65 mDevice.rebootIntoBootloader(); in wipeDevice() 66 mDevice.fastbootWipePartition(USERDATA_PARTITION); in wipeDevice() 67 mDevice.rebootUntilOnline(); in wipeDevice() 69 mDevice.pushFile(prop, "/data/local.prop"); in wipeDevice() 70 mDevice.executeShellCommand("chmod 644 /data/local.prop"); in wipeDevice() 71 mDevice.reboot(); in wipeDevice() 84 mDevice.remountSystemWritable(); in removeSystemApp() [all …]
|
D | PackageManagerHostTestUtils.java | 39 private ITestDevice mDevice = null; field in PackageManagerHostTestUtils 72 mDevice = device; in PackageManagerHostTestUtils() 125 mDevice.getIDevice()); in doRunTests() 139 mDevice.runInstrumentationTests(testRunner, listener); in doRunTests() 188 String result = mDevice.installPackage(localFile, replace); in installFile() 202 return mDevice.installPackage(apkFile, replace, "-l"); in installFileForwardLocked() 216 String lsResult = mDevice.executeShellCommand(String.format("ls %s", destPath)); in doesRemoteFileExistContainingString() 228 String pkgGrep = mDevice.executeShellCommand(String.format("pm path %s", packageName)); in doesPackageExist() 281 mDevice.waitForDeviceAvailable(MAX_WAIT_FOR_DEVICE_TIME); in waitForPackageManager() 301 mDevice.uninstallPackage(pkgName); in installAppAndVerifyExistsOnSDCard() [all …]
|
D | DataIdleTestHelper.java | 28 private ITestDevice mDevice; field in DataIdleTestHelper 33 mDevice = device; in DataIdleTestHelper() 47 String res = mDevice.executeShellCommand("ping -c 10 -w 100 " + host); in pingTest()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/result/ |
D | DeviceFileReporterTest.java | 35 ITestDevice mDevice = null; field in DeviceFileReporterTest 63 mDevice = EasyMock.createMock(ITestDevice.class); in setUp() 64 EasyMock.expect(mDevice.getSerialNumber()).andStubReturn("serial"); in setUp() 68 new DeviceFileReporter(mDevice, mListener) { in setUp() 82 EasyMock.expect(mDevice.executeShellCommand(EasyMock.eq("ls /data/tombstones/*"))) in testSimple() 85 EasyMock.expect(mDevice.pullFile(EasyMock.eq(filename))) in testSimple() 107 EasyMock.expect(mDevice.executeShellCommand(EasyMock.eq("ls /data/tombstones/*"))) in testTrim() 110 EasyMock.expect(mDevice.pullFile(EasyMock.eq(filename))) in testTrim() 133 EasyMock.expect(mDevice.executeShellCommand((String)EasyMock.anyObject())) in testLineEnding_LF() 138 EasyMock.expect(mDevice.pullFile(EasyMock.eq(filename))).andReturn( in testLineEnding_LF() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/ |
D | RunHostCommandTargetPreparerTest.java | 45 private ITestDevice mDevice; field in RunHostCommandTargetPreparerTest 52 mDevice = EasyMock.createMock(ITestDevice.class); in setUp() 83 EasyMock.expect(mDevice.getSerialNumber()).andReturn(DEVICE_SERIAL); in testSetUp() 85 EasyMock.replay(mRunUtil, mDevice); in testSetUp() 86 mPreparer.setUp(mDevice, null); in testSetUp() 87 EasyMock.verify(mRunUtil, mDevice); in testSetUp() 104 EasyMock.expect(mDevice.getSerialNumber()).andReturn(DEVICE_SERIAL); in testTearDown() 106 EasyMock.replay(mRunUtil, mDevice); in testTearDown() 107 mPreparer.tearDown(mDevice, null, null); in testTearDown() 108 EasyMock.verify(mRunUtil, mDevice); in testTearDown() [all …]
|
D | DeviceSetupFuncTest.java | 39 private ITestDevice mDevice; field in DeviceSetupFuncTest 44 mDevice = device; in setDevice() 49 return mDevice; in getDevice()
|
D | AppSetupFuncTest.java | 44 private ITestDevice mDevice; field in AppSetupFuncTest 48 mDevice = device; in setDevice() 53 return mDevice; in getDevice()
|
/tools/tradefederation/core/prod-tests/src/com/android/ota/tests/ |
D | OtaStabilityTest.java | 71 private ITestDevice mDevice; field in OtaStabilityTest 121 mDevice = device; in setDevice() 129 return mDevice; in getDevice() 222 mDevice.getSerialNumber(), buildId, actualIterations)); in run() 261 preparer.setUp(mDevice, mDeviceBuild); in flashDevice() 284 String currentBuildId = mDevice.getBuildId(); in waitForOta() 286 mDevice.getSerialNumber()), currentBuildId, mDeviceBuild.getBuildId()); in waitForOta() 290 mDevice.executeShellCommand( in waitForOta() 294 mDevice.getSerialNumber(), mWaitRecoveryTime), in waitForOta() 295 mDevice.waitForDeviceInRecovery(mWaitRecoveryTime * 60 * 1000)); in waitForOta() [all …]
|
D | SideloadOtaStabilityTest.java | 94 private ITestDevice mDevice; field in SideloadOtaStabilityTest 151 mDevice = device; in setDevice() 159 return mDevice; in getDevice() 212 mDevice.getSerialNumber(), in run() 226 IManagedTestDevice managedDevice = (IManagedTestDevice) mDevice; in run() 232 DeviceRecoveryModeUtil.bootOutOfRecovery((IManagedTestDevice) mDevice, in run() 258 preparer.setUp(mDevice, mOtaDeviceBuild); in flashDevice() 263 if (mDevice == null) { in checkFields() 299 Assert.assertTrue(mDevice.pushFile(otaBuild.getOtaPackageFile(), mPackageDataPath)); in installOta() 302 mDevice.pushString(mPackageDataPath + "\n", UNCRYPT_FILE_PATH); in installOta() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/device/metric/ |
D | ProcessMaxMemoryCollectorTest.java | 45 private ITestDevice mDevice; field in ProcessMaxMemoryCollectorTest 66 mDevice = mock(ITestDevice.class); in setup() 67 when(mContext.getDevices()).thenReturn(Collections.singletonList(mDevice)); in setup() 76 when(mDevice.executeShellCommand(Mockito.eq("dumpsys meminfo --checkin system_server"))) in testCollector() 81 mCollector.collect(mDevice, data); in testCollector() 84 verify(mDevice).executeShellCommand(Mockito.eq("dumpsys meminfo --checkin system_server")); in testCollector() 94 when(mDevice.executeShellCommand(Mockito.eq("dumpsys meminfo --checkin system_server"))) in testCollectorNoProcess() 99 mCollector.collect(mDevice, data); in testCollectorNoProcess() 102 verify(mDevice).executeShellCommand(Mockito.eq("dumpsys meminfo --checkin system_server")); in testCollectorNoProcess()
|
D | DumpHeapCollectorTest.java | 60 @Mock private ITestDevice mDevice; field in DumpHeapCollectorTest 70 when(mDevice.executeShellCommand(String.format("dumpsys meminfo -c | grep camera"))) in setup() 73 when(mDevice.executeShellCommand(String.format("dumpsys meminfo -c | grep maps"))) in setup() 76 when(mDevice.executeShellCommand("am dumpheap camera /data/local/tmp/camera_trigger.hprof")) in setup() 92 when(mDevice.dumpHeap("maps", "/data/local/tmp/maps_trigger_1.hprof")) in testTakeDumpheap_success() 100 mDumpheapCollector.takeDumpheap(mDevice, fakeDumpheapOutput, "maps", 850L); in testTakeDumpheap_success() 109 when(mDevice.dumpHeap(anyString(), anyString())) in testCollect_success() 124 mDumpheapCollector.collect(mDevice, null); in testCollect_success() 150 when(mDevice.pullFile(anyString())).thenReturn(tempFile1).thenReturn(tempFile2); in testCollectSuccess_thresholdTooHigh() 159 mDumpheapCollector.collect(mDevice, null); in testCollectSuccess_thresholdTooHigh() [all …]
|
/tools/tradefederation/core/prod-tests/src/com/android/wireless/tests/ |
D | RadioHelper.java | 36 private ITestDevice mDevice; field in RadioHelper 39 mDevice = device; in RadioHelper() 53 return mDevice.getProperty("gsm.current.phone-type"); in getPhoneType() 60 return mDevice.getProperty("gsm.sim.state"); in getSimState() 100 return mDevice.getProperty("ro.carrier").contains(WIFI_ONLY); in isWifiOnlyDevice() 104 mDevice.executeShellCommand("setprop dev.bootcomplete 0"); in resetBootComplete() 113 String res = mDevice.executeShellCommand("ping -c 10 -w 100 " + host); in pingTest() 142 mDevice.executeShellCommand("radiooptions 8 *22899"); in radioActivation()
|
/tools/tradefederation/core/prod-tests/src/com/android/sdk/ |
D | EmulatorBootTest.java | 51 private ITestDevice mDevice; field in EmulatorBootTest 83 return mDevice; in getDevice() 91 mDevice = device; in setDevice() 105 mAvdPreparer.setUp(mDevice, mBuildInfo); in run() 106 mSmsPreparer.setUp(mDevice, mBuildInfo); in run() 107 mGpsPreparer.setUp(mDevice, mBuildInfo); in run() 108 checkLauncherRunningOnEmulator(mDevice); in run() 114 mDevice.getSerialNumber()); in run() 139 CLog.i("%s on device %s is %s", cmd, mDevice.getSerialNumber(), cmdResult); in checkLauncherRunningOnEmulator()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/junit4/ |
D | DeviceParameterizedRunnerTest.java | 88 private ITestDevice mDevice; field in DeviceParameterizedRunnerTest 94 mDevice = EasyMock.createMock(ITestDevice.class); in setUp() 98 mTest.setDevice(mDevice); in setUp() 129 EasyMock.replay(mDevice, mBuild, mListener); in testRun() 131 EasyMock.verify(mDevice, mBuild, mListener); in testRun() 159 EasyMock.replay(mDevice, mBuild, mListener); in testRun_collectOnly() 161 EasyMock.verify(mDevice, mBuild, mListener); in testRun_collectOnly() 180 EasyMock.replay(mDevice, mBuild, mListener); in testRun_method() 182 EasyMock.verify(mDevice, mBuild, mListener); in testRun_method() 202 EasyMock.replay(mDevice, mBuild, mListener); in testRun_method_collectOnly() [all …]
|
/tools/tradefederation/core/src/com/android/tradefed/testtype/ |
D | NativeBenchmarkTest.java | 53 private ITestDevice mDevice = null; field in NativeBenchmarkTest 103 mDevice = device; in setDevice() 111 return mDevice; in getDevice() 206 mDevice.getSerialNumber(), cmd)); in doRunAllTestsInSubdirectory() 250 if (mDevice == null) { in run() 255 IFileEntry nativeTestDirectory = mDevice.getFileEntry(testPath); in run() 258 testPath, mDevice.getSerialNumber())); in run() 262 mDevice.executeShellCommand( in run() 266 doRunAllTestsInSubdirectory(nativeTestDirectory, mDevice, listener); in run() 269 mDevice.executeShellCommand( in run()
|
D | DeviceTestSuite.java | 31 private ITestDevice mDevice = null; field in DeviceTestSuite 46 return mDevice; in getDevice() 54 mDevice = device; in setDevice() 81 deviceTest.setDevice(mDevice); in runTest()
|
D | InstrumentationTest.java | 270 private ITestDevice mDevice = null; field in InstrumentationTest 289 mDevice = device; in setDevice() 515 return mDevice; in getDevice() 654 abiName = AbiFormatter.getDefaultAbi(mDevice, mForceAbi); in resolveAbiName() 705 checkArgument(mDevice != null, "Device has not been set."); in run() 716 mRunner = createRemoteAndroidTestRunner(mPackageName, mRunnerName, mDevice.getIDevice()); in run() 719 Assert.assertNull(mDevice.installPackage(mInstallFile, true, in run() 724 mDevice.uninstallPackage(mPackageName); in run() 826 mDevice.runInstrumentationTests(mRunner, listener); in doTestRun() 895 mDevice.runInstrumentationTests( in runWithRerun() [all …]
|
D | NativeStressTest.java | 51 private ITestDevice mDevice = null; field in NativeStressTest 82 mDevice = device; in setDevice() 90 return mDevice; in getDevice() 162 mDevice.getSerialNumber())); in doRunAllTestsInSubdirectory() 223 if (mDevice == null) { in run() 231 IFileEntry nativeTestDirectory = mDevice.getFileEntry(testPath); in run() 234 testPath, mDevice.getSerialNumber())); in run() 237 doRunAllTestsInSubdirectory(nativeTestDirectory, mDevice, listener); in run()
|
D | DeviceSuite.java | 47 private ITestDevice mDevice; field in DeviceSuite 60 mDevice = device; in setDevice() 64 if (mDevice == null) { in setDevice() 67 ((IDeviceTest)r).setDevice(mDevice); in setDevice() 74 return mDevice; in getDevice() 153 if (mDevice == null) { in injectValues() 156 ((IDeviceTest) testObj).setDevice(mDevice); in injectValues()
|
D | GoogleBenchmarkTest.java | 69 private ITestDevice mDevice = null; field in GoogleBenchmarkTest 76 mDevice = device; in setDevice() 84 return mDevice; in getDevice() 176 mDevice.getSerialNumber(), cmd)); in doRunAllTestsInSubdirectory() 247 if (mDevice == null) { in run() 251 if (!mDevice.doesFileExist(testPath)) { in run() 253 testPath, mDevice.getSerialNumber())); in run() 257 doRunAllTestsInSubdirectory(testPath, mDevice, listener); in run()
|
/tools/tradefederation/core/prod-tests/src/com/android/performance/tests/ |
D | AppInstallTest.java | 53 private ITestDevice mDevice; field in AppInstallTest 60 mDevice = device; in setDevice() 68 return mDevice; in getDevice() 117 if (!mDevice.pushFile(packageFile, remotePath)) { in installAndTime() 121 String output = mDevice.executeShellCommand( in installAndTime() 128 mDevice.executeShellCommand(String.format("rm \"%s\"", remotePath)); in installAndTime() 131 mDevice.uninstallPackage(packageName); in installAndTime()
|
/tools/tradefederation/core/src/com/android/tradefed/util/sl4a/ |
D | Sl4aClient.java | 56 private ITestDevice mDevice; field in Sl4aClient 73 mDevice = device; in Sl4aClient() 96 mDevice = device; in Sl4aClient() 156 mDevice.executeShellCommand(String.format(SL4A_LAUNCH_CMD, mDeviceSidePort)); in startSl4A() 172 String out1 = mDevice.executeShellCommand(IS_SL4A_RUNNING_CMD_OLD); in isSl4ARunning() 173 String out2 = mDevice.executeShellCommand(IS_SL4A_RUNNING_CMD); in isSl4ARunning() 188 mDevice.executeAdbCommand("forward", "tcp:" + mHostPort, "tcp:" + mDeviceSidePort); in open() 189 String res = mDevice.executeAdbCommand("forward", "--list"); in open() 279 mDevice.executeShellCommand(STOP_SL4A_CMD); in close() 280 mDevice.executeAdbCommand("forward", "--remove", "tcp:" + mHostPort); in close()
|
/tools/tradefederation/core/src/com/android/tradefed/util/ |
D | SimplePerfUtil.java | 34 private ITestDevice mDevice; field in SimplePerfUtil 42 mDevice = device; in SimplePerfUtil() 94 String output = mDevice.executeShellCommand(commandStringPreparer(command)); in executeCommand() 111 mDevice.executeShellCommand(commandStringPreparer(command), receiver); in executeCommand() 134 mDevice.executeShellCommand(commandStringPreparer(command), receiver, in executeCommand()
|
D | DeviceConcurrentUtil.java | 88 private ITestDevice mDevice; field in DeviceConcurrentUtil.ShellCommandCallable 98 mDevice = device; in ShellCommandCallable() 112 mDevice = device; in setDevice() 119 mDevice.executeShellCommand(mCommand, receiver, mTimeout, TimeUnit.MILLISECONDS, 1); in call()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/proto/ |
D | PlatformProtosFuncTest.java | 48 private ITestDevice mDevice; field in PlatformProtosFuncTest 52 mDevice = device; in setDevice() 57 return mDevice; in getDevice()
|