/tools/tradefederation/core/javatests/com/android/tradefed/device/ |
D | TestDeviceFuncTest.java | 75 private TestDevice mTestDevice; field in TestDeviceFuncTest 87 mTestDevice = (TestDevice) device; in setDevice() 92 return mTestDevice; in getDevice() 97 mMonitor = mTestDevice.getDeviceStateMonitor(); in setUp() 99 mTestDevice.waitForDeviceAvailable(); in setUp() 105 InputStreamSource bugreport = mTestDevice.getBugreport(); in testBugreport() 121 if (mTestDevice.getApiLevel() < 24) { in testBugreportz() 127 f = (FileInputStreamSource) mTestDevice.getBugreportz(); in testBugreportz() 158 final String output = mTestDevice.executeShellCommand("ls"); in assertSimpleShellCommand() 179 mTestDevice.uninstallPackage(WifiHelper.INSTRUMENTATION_PKG); in assertWifiApkInstall() [all …]
|
D | TestDevicePackageFuncTest.java | 36 private TestDevice mTestDevice; field in TestDevicePackageFuncTest 40 mTestDevice = (TestDevice) device; in setDevice() 45 return mTestDevice; in getDevice() 51 mTestDevice.waitForDeviceAvailable(); in setUp() 54 mTestDevice.getInstalledPackageNames().contains(WifiHelper.INSTRUMENTATION_PKG); in setUp() 57 mTestDevice.uninstallPackage(WifiHelper.INSTRUMENTATION_PKG); in setUp() 72 assertNull(mTestDevice.installPackage(testApkFile, false)); in testInstallListUninstall_basic() 74 mTestDevice in testInstallListUninstall_basic() 81 mTestDevice.doesFileExist( in testInstallListUninstall_basic() 85 mTestDevice.uninstallPackage(WifiHelper.INSTRUMENTATION_PKG); in testInstallListUninstall_basic() [all …]
|
D | NativeDeviceTest.java | 95 private TestableAndroidNativeDevice mTestDevice; field in NativeDeviceTest 150 mTestDevice = in setUp() 173 mTestDevice.setRecovery(mMockRecovery); in setUp() 174 mTestDevice.setCommandTimeout(100); in setUp() 175 mTestDevice.setLogStartDelay(-1); in setUp() 185 mTestDevice.installPackage(new File(""), false); in testInstallPackages_exception() 198 mTestDevice.uninstallPackage(""); in testUninstallPackages_exception() 212 mTestDevice.installPackage(new File(""), false, false); in testInstallPackagesBool_exception() 226 mTestDevice.installPackageForUser(new File(""), false, 0); in testInstallPackagesForUser_exception() 240 mTestDevice.installPackageForUser(new File(""), false, false, 0); in testInstallPackagesForUserWithPermission_exception() [all …]
|
D | TestDeviceFileFuncTest.java | 54 private TestDevice mTestDevice; field in TestDeviceFileFuncTest 59 mTestDevice.waitForDeviceAvailable(); in setUp() 60 mExternalStorage = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); in setUp() 72 mTestDevice.pushFile(testFile, deviceFilePath); in testPushPull_Basic() 73 returnedFile = mTestDevice.pullFile(deviceFilePath); in testPushPull_Basic() 80 mTestDevice.deleteFile(deviceFilePath); in testPushPull_Basic() 96 mTestDevice.pushFile(testFile, deviceFilePath); in testPushPull_ExtStorage() 97 returnedFile = mTestDevice.pullFile(deviceFilePath); in testPushPull_ExtStorage() 104 mTestDevice.deleteFile(deviceFilePath); in testPushPull_ExtStorage() 120 mTestDevice.pushString(testString, deviceFilePath); in testPushPull_FromString() [all …]
|
D | TestDeviceUserFuncTest.java | 36 private TestDevice mTestDevice; field in TestDeviceUserFuncTest 40 mTestDevice = (TestDevice) device; in setDevice() 45 return mTestDevice; in getDevice() 51 mTestDevice.waitForDeviceAvailable(); in setUp() 65 userId = mTestDevice.createUser(userName, false, false); in testUserLifecycle() 68 List<Integer> listedIDs = mTestDevice.listUsers(); in testUserLifecycle() 72 Map<Integer, UserInfo> userInfos = mTestDevice.getUserInfos(); in testUserLifecycle() 80 mTestDevice.removeUser(userId); in testUserLifecycle() 91 userId = mTestDevice.createUser(username, false, false); in testStartUser_IsRunningUser_StopUser() 94 mTestDevice.startUser(userId); in testStartUser_IsRunningUser_StopUser() [all …]
|
D | TestDeviceTest.java | 134 private TestDevice mTestDevice; field in TestDeviceTest 305 mTestDevice = in setUp() 318 mTestDevice.setRecovery(mMockRecovery); in setUp() 319 mTestDevice.setCommandTimeout(100); in setUp() 320 mTestDevice.setLogStartDelay(-1); in setUp() 341 assertTrue(mTestDevice.enableAdbRoot()); in testEnableAdbRoot_alreadyRoot() 349 assertTrue(mTestDevice.enableAdbRoot()); in testEnableAdbRoot_notRoot() 355 boolean enableRoot = mTestDevice.getOptions().isEnableAdbRoot(); in testEnableAdbRoot_noEnableRoot() 356 OptionSetter setter = new OptionSetter(mTestDevice.getOptions()); in testEnableAdbRoot_noEnableRoot() 359 assertFalse(mTestDevice.enableAdbRoot()); in testEnableAdbRoot_noEnableRoot() [all …]
|
D | TestDeviceShellFuncTest.java | 37 private TestDevice mTestDevice; field in TestDeviceShellFuncTest 42 mTestDevice = (TestDevice) device; in setDevice() 47 return mTestDevice; in getDevice() 53 mTestDevice.waitForDeviceAvailable(); in setUp() 69 mTestDevice.pushString(contents, devicePath); in testExecuteShellCommand_basic() 73 assumeTrue(mTestDevice.doesFileExist(devicePath)); in testExecuteShellCommand_basic() 76 String output = mTestDevice.executeShellCommand(String.format("ls %s", devicePath)); in testExecuteShellCommand_basic() 83 mTestDevice.executeShellCommand(String.format("cat %s", devicePath)); in testExecuteShellCommand_basic() 89 mTestDevice.deleteFile(devicePath); in testExecuteShellCommand_basic() 110 mTestDevice.pushString(contents, devicePath); in testExecuteShellCommandV2_basic() [all …]
|
D | MicrodroidFuncTest.java | 52 private TestDevice mTestDevice; field in MicrodroidFuncTest 57 mTestDevice = (TestDevice) device; in setDevice() 62 return mTestDevice; in getDevice() 77 mTestDevice.waitForDeviceAvailable(); in setup() 78 assumeTrue(mTestDevice.supportsMicrodroid()); in setup() 79 mTestDevice.executeShellV2Command("logcat -c"); in setup() 92 .build(mTestDevice); in testStartAndShutdownMicrodroid() 133 mTestDevice.shutdownMicrodroid(microdroid); in testStartAndShutdownMicrodroid()
|
/tools/tradefederation/core/javatests/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 | 153 private ITestDevice mTestDevice; field in MetricUtilTest 157 mTestDevice = Mockito.mock(ITestDevice.class); in setUpMocks() 163 when(mTestDevice.checkApiLevelAgainstNextRelease(MetricUtil.SDK_VERSION_Q)) in testNonEmptyMetricReportList() 169 .when(mTestDevice) in testNonEmptyMetricReportList() 177 List<EventMetricData> data = MetricUtil.getEventMetricData(mTestDevice, CONFIG_ID); in testNonEmptyMetricReportList() 193 when(mTestDevice.checkApiLevelAgainstNextRelease(MetricUtil.SDK_VERSION_Q)) in testEmptyMetricReportList() 199 .when(mTestDevice) in testEmptyMetricReportList() 207 List<EventMetricData> data = MetricUtil.getEventMetricData(mTestDevice, CONFIG_ID); in testEmptyMetricReportList() 219 when(mTestDevice.checkApiLevelAgainstNextRelease(MetricUtil.SDK_VERSION_Q)) in testMultipleReportsInReportList_differentAtoms() 225 .when(mTestDevice) in testMultipleReportsInReportList_differentAtoms() [all …]
|
/tools/tradefederation/core/src/com/android/tradefed/testtype/ |
D | DeviceBatteryLevelChecker.java | 49 private ITestDevice mTestDevice = null; field in DeviceBatteryLevelChecker 106 mTestDevice.executeShellCommand("stop"); in stopDeviceRuntime() 110 mTestDevice.executeShellCommand("start"); in startDeviceRuntime() 111 mTestDevice.waitForDeviceAvailable(); in startDeviceRuntime() 118 mTestDevice = testInfo.getDevice(); in run() 119 Assert.assertNotNull(mTestDevice); in run() 172 mTestDevice = testInfo.getDevice(); in runTest() 173 Assert.assertNotNull(mTestDevice); in runTest() 175 Integer batteryLevel = checkBatteryLevel(mTestDevice); in runTest() 179 mTestDevice.getSerialNumber()); in runTest() [all …]
|
/tools/tradefederation/contrib/src/com/android/media/tests/ |
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 | 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 | 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 | 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 | 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()
|
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()
|
/tools/tradefederation/core/src/com/android/tradefed/device/ |
D | BackgroundDeviceAction.java | 48 private ITestDevice mTestDevice; field in BackgroundDeviceAction 68 mTestDevice = device; in BackgroundDeviceAction() 90 mLogStartDelay, mDescriptor, mTestDevice.getSerialNumber()); in run() 98 CLog.d("Starting %s for %s.", mDescriptor, mTestDevice.getSerialNumber()); in run() 101 mTestDevice in run() 122 mDescriptor, mTestDevice.getSerialNumber()); in waitForDeviceRecovery() 151 CLog.d("Waiting for device %s online before starting.", mTestDevice.getSerialNumber()); in blockUntilOnlineNoThrow() 154 if ((mTestDevice.getIDevice() instanceof StubDevice) in blockUntilOnlineNoThrow() 155 || !TestDeviceState.ONLINE.equals(mTestDevice.getDeviceState())) { in blockUntilOnlineNoThrow() 158 CLog.d("Device %s now online.", mTestDevice.getSerialNumber()); in blockUntilOnlineNoThrow()
|
/tools/tradefederation/core/javatests/com/android/tradefed/suite/checker/ |
D | ActivityStatusCheckerFuncTest.java | 33 private TestDevice mTestDevice; field in ActivityStatusCheckerFuncTest 38 mTestDevice = (TestDevice) device; in setDevice() 43 return mTestDevice; in getDevice() 49 mTestDevice.waitForDeviceAvailable(); in setUp() 56 assertEquals(CheckStatus.SUCCESS, mChecker.postExecutionCheck(mTestDevice).getStatus()); in testPostExecutionCheck()
|
/tools/tradefederation/contrib/src/com/android/performance/tests/ |
D | HermeticMemoryTest.java | 97 private ITestDevice mTestDevice = null; field in HermeticMemoryTest 107 String preMemInfo = mTestDevice.executeShellCommand(PROC_MEMINFO); in run() 121 mTestDevice.executeShellCommand(DROP_CACHE); in run() 127 mTestDevice.executeShellCommand(String.format(AM_START, mComponentName)); in run() 129 mTestDevice.executeShellCommand( in run() 134 String postMemInfo = mTestDevice.executeShellCommand(PROC_MEMINFO); in run() 137 mTestDevice.executeShellCommand(String.format("%s %d", DUMPSYS_MEMINFO, processId)); in run() 138 String mapsInfo = mTestDevice.executeShellCommand(String.format(MAPS_INFO, processId)); in run() 139 String sMapsInfo = mTestDevice.executeShellCommand(String.format(SMAPS_INFO, processId)); in run() 140 String statusInfo = mTestDevice.executeShellCommand(String.format(STATUS_INFO, processId)); in run() [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 …]
|
/tools/tradefederation/contrib/src/com/android/media/template/ |
D | AudioTestHarnessTemplateTest.java | 50 ITestDevice mTestDevice = null; field in AudioTestHarnessTemplateTest 66 Assert.assertNotNull(mTestDevice); in run() 69 TEST_RUNNER_NAME, mTestDevice.getIDevice()); in run() 76 mTestDevice.runInstrumentationTests(runner, listener); in run() 82 mTestDevice = device; in setDevice() 87 return mTestDevice; in getDevice()
|
/tools/tradefederation/core/javatests/com/android/tradefed/targetprep/ |
D | TemperatureThrottlingWaiterTest.java | 42 @Mock private ITestDevice mTestDevice; field in TemperatureThrottlingWaiterTest 50 when(mTestInfo.getDevice()).thenReturn(mTestDevice); in setUp() 64 when(mTestDevice.executeShellCommand("cat /foo/bar/tmp")).thenReturn("Result:30 Raw:7f6f"); in testGetTemperatureFromFile_rawFormat_success() 73 when(mTestDevice.executeShellCommand("cat /foo/bar/tmp")) in testGetTemperatureFromFile_noFile_throws() 82 when(mTestDevice.executeShellCommand("cat /foo/bar/tmp")).thenReturn("30"); in testGetTemperatureFromFile_format_success() 91 when(mTestDevice.executeShellCommand( in testGetTemperatureFromCommand_skinTemp_success()
|
/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 …]
|