/tools/tradefederation/core/tests/src/com/android/tradefed/device/ |
D | TestDeviceFuncTest.java | 67 private TestDevice mTestDevice; field in TestDeviceFuncTest 74 mTestDevice = (TestDevice) device; in setDevice() 79 return mTestDevice; in getDevice() 84 mMonitor = mTestDevice.getDeviceStateMonitor(); in setUp() 86 mTestDevice.waitForDeviceAvailable(); in setUp() 92 InputStreamSource bugreport = mTestDevice.getBugreport(); in testBugreport() 108 if (mTestDevice.getApiLevel() < 24) { in testBugreportz() 114 f = (FileInputStreamSource) mTestDevice.getBugreportz(); in testBugreportz() 145 final String output = mTestDevice.executeShellCommand("ls"); in assertSimpleShellCommand() 168 mTestDevice.uninstallPackage(WifiHelper.INSTRUMENTATION_PKG); in assertWifiApkInstall() [all …]
|
D | NativeDeviceTest.java | 87 private TestableAndroidNativeDevice mTestDevice; field in NativeDeviceTest 129 mTestDevice = new TestableAndroidNativeDevice() { in setUp() 145 mTestDevice.setRecovery(mMockRecovery); in setUp() 146 mTestDevice.setCommandTimeout(100); in setUp() 147 mTestDevice.setLogStartDelay(-1); in setUp() 157 mTestDevice.installPackage(new File(""), false); in testInstallPackages_exception() 172 mTestDevice.uninstallPackage(""); in testUninstallPackages_exception() 188 mTestDevice.installPackage(new File(""), false, false); in testInstallPackagesBool_exception() 204 mTestDevice.installPackageForUser(new File(""), false, 0); in testInstallPackagesForUser_exception() 220 mTestDevice.installPackageForUser(new File(""), false, false, 0); in testInstallPackagesForUserWithPermission_exception() [all …]
|
D | TestDeviceTest.java | 91 private TestDevice mTestDevice; field in TestDeviceTest 145 mTestDevice = in setUp() 157 mTestDevice.setRecovery(mMockRecovery); in setUp() 158 mTestDevice.setCommandTimeout(100); in setUp() 159 mTestDevice.setLogStartDelay(-1); in setUp() 181 assertTrue(mTestDevice.enableAdbRoot()); in testEnableAdbRoot_alreadyRoot() 190 assertTrue(mTestDevice.enableAdbRoot()); in testEnableAdbRoot_notRoot() 197 boolean enableRoot = mTestDevice.getOptions().isEnableAdbRoot(); in testEnableAdbRoot_noEnableRoot() 198 OptionSetter setter = new OptionSetter(mTestDevice.getOptions()); in testEnableAdbRoot_noEnableRoot() 201 assertFalse(mTestDevice.enableAdbRoot()); in testEnableAdbRoot_noEnableRoot() [all …]
|
D | TestDeviceStressTest.java | 48 private TestDevice mTestDevice; field in TestDeviceStressTest 54 mTestDevice = (TestDevice)getDevice(); in setUp() 55 mMonitor = mTestDevice.getDeviceStateMonitor(); in setUp() 76 mTestDevice.reboot(); in testManyReboots() 84 mTestDevice.rebootIntoBootloader(); in testManyRebootBootloaders() 86 mTestDevice.reboot(); in testManyRebootBootloaders() 96 mTestDevice.reboot(); in testManyDisableKeyguard() 113 String externalStorePath = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); in testPushFolderWithManyFiles() 123 mTestDevice.deleteFile(deviceFilePath); in testPushFolderWithManyFiles() 125 mTestDevice.doesFileExist(deviceFilePath)); in testPushFolderWithManyFiles() [all …]
|
D | RemoteAndroidDeviceTest.java | 45 private RemoteAndroidDevice mTestDevice; field in RemoteAndroidDeviceTest 71 mTestDevice = new TestableRemoteAndroidDevice(); in setUp() 72 mTestDevice.setRecovery(mMockRecovery); in setUp() 91 assertTrue(mTestDevice.adbTcpConnect("localhost", "1234")); in testAdbConnect() 106 assertFalse(mTestDevice.adbTcpConnect("localhost", "1234")); in testAdbConnect_fails() 125 assertFalse(mTestDevice.adbTcpConnect("localhost", "1234")); in testAdbConnect_fails_confirmation() 137 assertTrue(mTestDevice.adbTcpDisconnect("localhost", "1234")); in testAdbDisconnect() 149 assertFalse(mTestDevice.adbTcpDisconnect("localhost", "1234")); in testAdbDisconnect_fails() 155 assertEquals("localhost", mTestDevice.getHostName()); in testCheckSerial() 156 assertEquals("1234", mTestDevice.getPortNum()); in testCheckSerial() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/util/statsd/ |
D | ConfigUtilTest.java | 53 private ITestDevice mTestDevice; field in ConfigUtilTest 58 mTestDevice = Mockito.mock(ITestDevice.class); in setUpMocks() 67 when(mTestDevice.pushFile(any(File.class), anyString())).thenReturn(true); in testPushDeviceConfig() 70 when(mTestDevice.executeShellV2Command(matches(STATS_CONFIG_UPDATE_MATCHER))) in testPushDeviceConfig() 76 mTestDevice, in testPushDeviceConfig() 82 verify(mTestDevice, times(1)).pushFile(any(File.class), anyString()); in testPushDeviceConfig() 83 verify(mTestDevice, times(1)).executeShellV2Command(matches(STATS_CONFIG_UPDATE_MATCHER)); in testPushDeviceConfig() 84 verify(mTestDevice, times(1)).deleteFile(matches(REMOTE_PATH_MATCHER)); in testPushDeviceConfig() 91 when(mTestDevice.pushFile(any(File.class), anyString())).thenReturn(true); in testPushInvalidDeviceConfig() 94 when(mTestDevice.executeShellV2Command(matches(STATS_CONFIG_UPDATE_MATCHER))) in testPushInvalidDeviceConfig() [all …]
|
D | MetricUtilTest.java | 151 private ITestDevice mTestDevice; field in MetricUtilTest 155 mTestDevice = Mockito.mock(ITestDevice.class); in setUpMocks() 165 .when(mTestDevice) in testNonEmptyMetricReportList() 172 List<EventMetricData> data = MetricUtil.getEventMetricData(mTestDevice, CONFIG_ID); in testNonEmptyMetricReportList() 190 .when(mTestDevice) in testEmptyMetricReportList() 197 List<EventMetricData> data = MetricUtil.getEventMetricData(mTestDevice, CONFIG_ID); in testEmptyMetricReportList() 213 .when(mTestDevice) in testMultipleReportsInReportList_differentAtoms() 220 List<EventMetricData> data = MetricUtil.getEventMetricData(mTestDevice, CONFIG_ID); in testMultipleReportsInReportList_differentAtoms() 241 .when(mTestDevice) in testMultipleReportsInReportList_sameAtom() 248 List<EventMetricData> data = MetricUtil.getEventMetricData(mTestDevice, CONFIG_ID); in testMultipleReportsInReportList_sameAtom() [all …]
|
/tools/tradefederation/core/src/com/android/tradefed/testtype/ |
D | DeviceBatteryLevelChecker.java | 41 private ITestDevice mTestDevice = null; field in DeviceBatteryLevelChecker 99 Assert.assertNotNull(mTestDevice); in run() 101 Integer batteryLevel = checkBatteryLevel(mTestDevice); in run() 105 mTestDevice.getSerialNumber()); in run() 110 "to level %d", batteryLevel, mMaxBattery, mTestDevice.getSerialNumber(), in run() 115 mMaxBattery, mTestDevice.getSerialNumber()); in run() 121 CLog.d("Rebooting device %s prior to holding", mTestDevice.getSerialNumber()); in run() 122 mTestDevice.reboot(); in run() 126 turnScreenOff(mTestDevice); in run() 138 Integer newLevel = checkBatteryLevel(mTestDevice); in run() [all …]
|
/tools/tradefederation/contrib/src/com/android/graphics/tests/ |
D | UiPerformanceTest.java | 53 private ITestDevice mTestDevice = null; field in UiPerformanceTest 80 mTestDevice = testDevice; in setDevice() 85 return mTestDevice; in getDevice() 90 String extStore = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); in setupDevice() 93 if (!mTestDevice.doesFileExist(rawFileDir)) { in setupDevice() 95 mTestDevice.executeShellCommand(String.format("mkdir \"%s\"", rawFileDir)); in setupDevice() 98 mTestDevice.executeShellCommand(String.format("rm %s/*", rawFileDir)); in setupDevice() 106 Assert.assertNotNull(mTestDevice); in run() 112 TEST_PACKAGE_NAME, TEST_RUNNER_NAME, mTestDevice.getIDevice()); in run() 115 BugreportCollector bugListener = new BugreportCollector(standardListener, mTestDevice); in run() [all …]
|
D | UserActionBenchmark.java | 62 ITestDevice mTestDevice = null; field in UserActionBenchmark 91 Assert.assertNotNull(mTestDevice); in run() 97 String extStore = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); in run() 99 String.format("%s/%s/%s", extStore, mScriptPath, mTestDevice.getProductType()); in run() 102 mTestDevice.executeShellCommand( in run() 117 String extStore = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); in cleanResultFile() 118 mTestDevice.executeShellCommand( in cleanResultFile() 131 outputFile = mTestDevice.pullFileFromExternal(mDeviceTestOutputFilename); in logOutputFiles() 209 mTestDevice = device; in setDevice() 214 return mTestDevice; in getDevice()
|
/tools/tradefederation/contrib/src/com/android/performance/tests/ |
D | StartupMetricsTest.java | 66 ITestDevice mTestDevice = null; field in StartupMetricsTest 70 Assert.assertNotNull(mTestDevice); in run() 89 mTestDevice.rebootIntoBootloader(); in executeRebootTest() 90 mTestDevice.setUseFastbootErase(false); in executeRebootTest() 91 mTestDevice.fastbootWipePartition("userdata"); in executeRebootTest() 92 mTestDevice.executeFastbootCommand("reboot"); in executeRebootTest() 93 mTestDevice.waitForDeviceOnline(10 * 60 * 1000); in executeRebootTest() 95 Assert.assertTrue(waitForBootComplete(mTestDevice, mBootTimeMs, mBootPoolTimeMs)); in executeRebootTest() 100 mTestDevice.setRecoveryMode(RecoveryMode.NONE); in executeRebootTest() 102 mTestDevice.nonBlockingReboot(); in executeRebootTest() [all …]
|
D | EmmcPerformanceTest.java | 114 ITestDevice mTestDevice = null; field in EmmcPerformanceTest 273 output = mTestDevice.executeShellCommand(command).split("\n"); in runDdIteration() 304 output = mTestDevice.executeShellCommand(command); in runRandomIteration() 346 mTestDevice.executeShellCommand("echo 3 > /proc/sys/vm/drop_caches"); in dropCache() 368 mTestDevice.executeShellCommand("umount /sdcard"); in setUp() 369 mTestDevice.executeShellCommand("umount /data"); in setUp() 370 mTestDevice.executeShellCommand("umount /cache"); in setUp() 372 mTestDevice.executeShellCommand( in setUp() 374 mTestDevice.executeShellCommand( in setUp() 378 mSpUtil = SimplePerfUtil.newInstance(mTestDevice, SimplePerfType.STAT); in setUp() [all …]
|
D | FioBenchmarkTest.java | 415 ITestDevice mTestDevice = null; field in FioBenchmarkTest 936 mTestDevice.executeShellCommand("stop"); in setupDevice() 937 mTestDevice.executeShellCommand(String.format("mkdir -p %s", mFioDir)); in setupDevice() 938 mTestDevice.executeShellCommand(String.format("mkdir -p %s", mTmpDir)); in setupDevice() 939 mTestDevice.executeShellCommand(String.format("mkdir -p %s", mInternalTestDir)); in setupDevice() 940 mTestDevice.executeShellCommand(String.format("mkdir -p %s", mMediaTestDir)); in setupDevice() 942 mTestDevice.executeShellCommand(String.format("mkdir -p %s", mExternalTestDir)); in setupDevice() 945 mTestDevice.pushFile(new File(mFioLocation), mFioBin); in setupDevice() 946 mTestDevice.executeShellCommand(String.format("chmod 755 %s", mFioBin)); in setupDevice() 957 mTestDevice.executeShellCommand(String.format("rm -r %s", mExternalTestDir)); in cleanupDevice() [all …]
|
D | HermeticMemoryTest.java | 96 private ITestDevice mTestDevice = null; field in HermeticMemoryTest 106 String preMemInfo = mTestDevice.executeShellCommand(PROC_MEMINFO); in run() 120 mTestDevice.executeShellCommand(DROP_CACHE); in run() 126 mTestDevice.executeShellCommand(String.format(AM_START, mComponentName)); in run() 128 mTestDevice.executeShellCommand( in run() 133 String postMemInfo = mTestDevice.executeShellCommand(PROC_MEMINFO); in run() 136 mTestDevice.executeShellCommand(String.format("%s %d", DUMPSYS_MEMINFO, processId)); in run() 137 String mapsInfo = mTestDevice.executeShellCommand(String.format(MAPS_INFO, processId)); in run() 138 String sMapsInfo = mTestDevice.executeShellCommand(String.format(SMAPS_INFO, processId)); in run() 139 String statusInfo = mTestDevice.executeShellCommand(String.format(STATUS_INFO, processId)); in run() [all …]
|
/tools/tradefederation/contrib/src/com/android/media/tests/ |
D | MediaMemoryTest.java | 67 ITestDevice mTestDevice = null; field in MediaMemoryTest 108 Assert.assertNotNull(mTestDevice); in run() 111 TEST_RUNNER_NAME, mTestDevice.getIDevice()); in run() 122 mTestDevice); in run() 129 mTestDevice.runInstrumentationTests(runner, bugListener); in run() 132 mTestDevice.runInstrumentationTests(runner, bugListener); in run() 142 String extStore = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); in cleanResultFile() 144 mTestDevice.executeShellCommand(String.format("rm %s/%s", extStore, outputPath)); in cleanResultFile() 147 mTestDevice.executeShellCommand(String.format("rm %s/%s", extStore, "*.dump")); in cleanResultFile() 157 String extStore = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); in uploadHeapDumpFiles() [all …]
|
D | VideoEditingMemoryTest.java | 67 ITestDevice mTestDevice = null; field in VideoEditingMemoryTest 104 Assert.assertNotNull(mTestDevice); in run() 107 TEST_PACKAGE_NAME, TEST_RUNNER_NAME, mTestDevice.getIDevice()); in run() 115 mTestDevice); in run() 119 mTestDevice.runInstrumentationTests(runner, bugListener); in run() 130 mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); in cleanResultFile() 132 mTestDevice.executeShellCommand(String.format("rm %s/%s", extStore, in cleanResultFile() 136 mTestDevice.executeShellCommand(String.format("rm %s/%s", extStore, in cleanResultFile() 148 mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); in uploadHeapDumpFiles() 150 String out = mTestDevice.executeShellCommand(String.format("ls %s/%s", in uploadHeapDumpFiles() [all …]
|
D | PanoramaBenchMarkTest.java | 42 private ITestDevice mTestDevice = null; field in PanoramaBenchMarkTest 55 Assert.assertNotNull(mTestDevice); in run() 57 String dataStore = mTestDevice.getMountPoint(IDevice.MNT_DATA); in run() 58 String externalStore = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); in run() 60 mTestDevice.executeShellCommand(String.format("chmod 777 %s/local/tmp/panorama_bench", in run() 63 String shellOutput = mTestDevice.executeShellCommand( in run() 91 mTestDevice = device; in setDevice() 99 return mTestDevice; in getDevice() 109 String externalStore = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); in cleanupDevice() 110 mTestDevice.executeShellCommand(String.format("rm -r %s/panorama_input", externalStore)); in cleanupDevice() [all …]
|
D | CameraShotToShotLatencyTest.java | 60 ITestDevice mTestDevice = null; field in CameraShotToShotLatencyTest 67 Assert.assertNotNull(mTestDevice); in run() 70 TEST_RUNNER_NAME, mTestDevice.getIDevice()); in run() 73 BugreportCollector bugListener = new BugreportCollector(listener, mTestDevice); in run() 76 Assert.assertTrue(mTestDevice.runInstrumentationTests(runner, bugListener)); in run() 88 mTestDevice = device; in setDevice() 96 return mTestDevice; in getDevice() 106 String extStore = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); in cleanupDevice() 107 mTestDevice.executeShellCommand(String.format("rm -r %s/DCIM", extStore)); in cleanupDevice() 108 mTestDevice.executeShellCommand(String.format("rm %s/%s", extStore, mOutputPath)); in cleanupDevice() [all …]
|
D | CameraSettingsTest.java | 75 ITestDevice mTestDevice = null; field in CameraSettingsTest 82 Assert.assertNotNull(mTestDevice); in run() 85 TEST_RUNNER_NAME, mTestDevice.getIDevice()); in run() 93 BugreportCollector bugListener = new BugreportCollector(listener, mTestDevice); in run() 96 Assert.assertTrue(mTestDevice.runInstrumentationTests(runner, bugListener)); in run() 108 mTestDevice = device; in setDevice() 116 return mTestDevice; in getDevice() 126 String extStore = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); in cleanupDevice() 127 mTestDevice.executeShellCommand(String.format("rm %s/%s", extStore, mOutputPath)); in cleanupDevice() 151 outputFile = mTestDevice.pullFileFromExternal(mOutputPath); in parseOutputFile() [all …]
|
D | MediaStressTest.java | 58 ITestDevice mTestDevice = null; field in MediaStressTest 79 Assert.assertNotNull(mTestDevice); in run() 82 TEST_RUNNER_NAME, mTestDevice.getIDevice()); in run() 87 mTestDevice.runInstrumentationTests(runner, listener); in run() 96 String extStore = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); in cleanTmpFiles() 97 mTestDevice.executeShellCommand(String.format("rm %s/temp*.3gp", extStore)); in cleanTmpFiles() 98 mTestDevice.executeShellCommand(String.format("rm %s/%s", extStore, OUTPUT_PATH)); in cleanTmpFiles() 110 outputFile = mTestDevice.pullFileFromExternal(OUTPUT_PATH); in logOutputFile() 219 mTestDevice = device; in setDevice() 224 return mTestDevice; in getDevice()
|
D | VideoEditingPerformanceTest.java | 64 ITestDevice mTestDevice = null; field in VideoEditingPerformanceTest 137 Assert.assertNotNull(mTestDevice); in run() 140 TEST_PACKAGE_NAME, TEST_RUNNER_NAME, mTestDevice.getIDevice()); in run() 145 mTestDevice); in run() 149 mTestDevice.runInstrumentationTests(runner, bugListener); in run() 160 mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); in cleanResultFile() 161 mTestDevice.executeShellCommand(String.format("rm %s/%s", extStore, OUTPUT_PATH)); in cleanResultFile() 173 outputFile = mTestDevice.pullFileFromExternal(OUTPUT_PATH); in logOutputFiles() 251 mTestDevice = device; in setDevice() 256 return mTestDevice; in getDevice()
|
/tools/tradefederation/core/src/com/android/tradefed/device/ |
D | BackgroundDeviceAction.java | 47 private ITestDevice mTestDevice; field in BackgroundDeviceAction 67 mTestDevice = device; in BackgroundDeviceAction() 87 mTestDevice.getSerialNumber()); in run() 95 CLog.d("Starting %s for %s.", mDescriptor, mTestDevice.getSerialNumber()); in run() 98 mTestDevice.getIDevice().executeShellCommand(mCommand, mReceiver, in run() 117 mDescriptor, mTestDevice.getSerialNumber()); in waitForDeviceRecovery() 146 CLog.d("Waiting for device %s online before starting.", mTestDevice.getSerialNumber()); in blockUntilOnlineNoThrow() 149 if ((mTestDevice.getIDevice() instanceof StubDevice) in blockUntilOnlineNoThrow() 150 || !TestDeviceState.ONLINE.equals(mTestDevice.getDeviceState())) { in blockUntilOnlineNoThrow() 153 CLog.d("Device %s now online.", mTestDevice.getSerialNumber()); in blockUntilOnlineNoThrow()
|
/tools/tradefederation/contrib/src/com/android/wireless/tests/ |
D | WifiStressTest.java | 57 private ITestDevice mTestDevice = null; field in WifiStressTest 190 mTestDevice.executeShellCommand(command); in setDeviceScreenTimeout() 193 mTestDevice.reboot(); in setDeviceScreenTimeout() 204 mTestDevice.executeShellCommand("svc power stayon " + on); in setScreenProperty() 209 mTestDevice = testDevice; in setDevice() 214 return mTestDevice; in getDevice() 220 Assert.assertNotNull(mTestDevice); in run() 228 final RadioHelper radioHelper = new RadioHelper(mTestDevice); in run() 235 TEST_PACKAGE_NAME, TEST_RUNNER_NAME, mTestDevice.getIDevice()); in run() 247 BugreportCollector bugListener = new BugreportCollector(standardListener, mTestDevice); in run() [all …]
|
/tools/tradefederation/contrib/src/com/android/framework/tests/ |
D | DataIdleTest.java | 45 ITestDevice mTestDevice = null; field in DataIdleTest 71 Assert.assertNotNull(mTestDevice); in run() 72 mTestHelper = new DataIdleTestHelper(mTestDevice); in run() 77 !mTestDevice.isWifiEnabled()); in run() 86 new RemoteAndroidTestRunner(mTestPackageName, mTestDevice.getIDevice()); in run() 96 Assert.assertTrue(mTestDevice.runInstrumentationTests(runner, collectingListener)); in run() 121 try (InputStreamSource bugreport = mTestDevice.getBugreport()) { in logBugReport() 133 String output = mTestDevice.executeShellCommand("dumpsys netstats detail full"); in logNetStats() 155 mTestDevice = device; in setDevice() 160 return mTestDevice; in getDevice()
|
/tools/tradefederation/contrib/src/com/android/monkey/ |
D | MonkeyBase.java | 287 private ITestDevice mTestDevice = null; field in MonkeyBase 385 mTestDevice.getBuildId(), in runMonkey() 386 mTestDevice.getBuildFlavor(), in runMonkey() 387 mTestDevice.getSerialNumber()); in runMonkey() 392 commandHelper.runCommand(mTestDevice, command, getMonkeyTimeoutMs()); in runMonkey() 396 mTestDevice.waitForDeviceOnline(); in runMonkey() 397 mTestDevice.enableAdbRoot(); in runMonkey() 495 try (InputStreamSource screenshot = mTestDevice.getScreenshot("JPEG")) { in takeScreenshot() 503 Bugreport bugreport = mTestDevice.takeBugreport(); in takeBugreport() 534 DeviceFileReporter dfr = new DeviceFileReporter(mTestDevice, listener); in takeTraces() [all …]
|