Home
last modified time | relevance | path

Searched refs:getDevice (Results 1 – 25 of 179) sorted by relevance

12345678

/tools/tradefederation/core/tests/src/com/android/tradefed/device/
DTestDeviceFuncTest.java82 public ITestDevice getDevice() { in getDevice() method in TestDeviceFuncTest
611 getDevice().getIDevice().reboot(null); in testRebootIntoRecovery()
685 getDevice().reboot(); in testClearErrorDialogs_crash()
695 getDevice().executeShellCommand("am start -n " + TestAppConstants.CRASH_ACTIVITY); in testClearErrorDialogs_crash()
701 assertTrue("Clear dialogs did not clear anything", getDevice().clearErrorDialogs()); in testClearErrorDialogs_crash()
715 getDevice().reboot(); in testDisableKeyguard()
746 InputStreamSource source = getDevice().getScreenshot(); in testGetScreenshot()
774 getDevice().executeShellCommand(String.format("log testGetLogcat_size log dump %d", i)); in testGetLogcat_size()
779 try (InputStreamSource source = getDevice().getLogcatDump()) { in testGetLogcat_size()
808 if (!getDevice().isEncryptionSupported()) { in testEncryption()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/
DInstrumentationTestFuncTest.java80 public ITestDevice getDevice() { in getDevice() method in InstrumentationTestFuncTest
88 mInstrumentationTest.setDevice(getDevice()); in setUp()
94 getDevice().disableKeyguard(); in setUp()
154 if (getDevice().getApiLevel() <= 23) { in testRun_testCrash()
177 getDevice().waitForDeviceAvailable(); in testRun_testCrash()
185 RecoveryMode initMode = getDevice().getRecoveryMode(); in testRun_testTimeout()
186 getDevice().setRecoveryMode(RecoveryMode.NONE); in testRun_testTimeout()
209 getDevice().setRecoveryMode(initMode); in testRun_testTimeout()
235 getDevice().reboot(); in testRun_deviceReboot()
261 getDevice().waitForDeviceAvailable(); in testRun_deviceReboot()
[all …]
DInstrumentationFileTestTest.java155 assertEquals(mMockTestDevice, mMockITest.getDevice()); in testRun_singleSuccessfulTest()
259 assertEquals(mMockTestDevice, mMockITest.getDevice()); in testRun_reRunOneFailedToCompleteTest()
371 assertEquals(mMockTestDevice, mMockITest.getDevice()); in testRun_serialReRunOfTwoFailedToCompleteTests()
428 assertEquals(mMockTestDevice, mMockITest.getDevice()); in testRun_noSerialReRun()
561 assertEquals(mMockTestDevice, mMockITest.getDevice()); in testRun_exceedMaxAttempts()
658 assertEquals(mMockTestDevice, mMockITest.getDevice()); in testRun_parameterized()
/tools/tradefederation/core/test_framework/com/android/tradefed/testtype/
DUiAutomatorTest.java182 public ITestDevice getDevice() { in getDevice() method in UiAutomatorTest
232 getDevice().runInstrumentationTests(getTestRunner(), mListeners); in run()
234 getDevice().runInstrumentationTests(getTestRunner(), mListeners); in run()
254 new RemoteAndroidTestRunner(mPackage, mRunnerName, getDevice().getIDevice()); in createTestRunner()
258 int apiLevel = !mHiddenApiChecks || !mWindowAnimation ? getDevice().getApiLevel() : 0; in createTestRunner()
267 && getDevice().checkApiLevelAgainstNextRelease(30)) { in createTestRunner()
271 if (!mIsolatedStorage && getDevice().checkApiLevelAgainstNextRelease(29)) { in createTestRunner()
286 return new UiAutomatorRunner(getDevice().getIDevice(), in createTestRunner()
294 getDevice().executeShellCommand(String.format("ls %s", SHELL_EXE_BASE)); in buildJarPaths()
325 if (!getDevice().doesFileExist(runnerPath)) { in preTestSetup()
[all …]
DInstrumentationTest.java583 public ITestDevice getDevice() { in getDevice() method in InstrumentationTest
690 int apiLevel = !mHiddenApiChecks || !mWindowAnimation ? getDevice().getApiLevel() : 0; in createRemoteAndroidTestRunner()
699 && getDevice().checkApiLevelAgainstNextRelease(30)) { in createRemoteAndroidTestRunner()
703 if (!mIsolatedStorage && getDevice().checkApiLevelAgainstNextRelease(29)) { in createRemoteAndroidTestRunner()
711 if (abiName != null && getDevice().getApiLevel() > 20) { in createRemoteAndroidTestRunner()
766 getDevice().executeShellCommand("pm list instrumentation", parser); in queryRunnerName()
986 BugreportCollector collector = new BugreportCollector(listener, getDevice()); in addBugreportListenerIfEnabled()
1004 getDevice(), in addJavaCoverageListenerIfEnabled()
1024 getDevice(), mConfiguration.getCoverageOptions(), listener); in addGcovCoverageListenerIfEnabled()
1041 new ClangCodeCoverageListener(getDevice(), listener); in addClangCoverageListenerIfEnabled()
[all …]
DInstalledInstrumentationsTest.java267 public ITestDevice getDevice() { in getDevice() method in InstalledInstrumentationsTest
310 if (getDevice() == null) { in run()
330 String pmListOutput = getDevice().executeShellCommand(PM_LIST_CMD); in buildTests()
336 "No instrumentations were found on device %s - <%s>", getDevice() in buildTests()
415 CLog.d("Running test %s on %s", test.getPackageName(), getDevice().getSerialNumber()); in doRun()
417 test.setDevice(getDevice()); in doRun()
DInstrumentationFileTest.java86 mInstrumentationTest.setDevice(instrumentationTest.getDevice()); in InstrumentationFileTest()
103 if (mInstrumentationTest.getDevice() == null) { in run()
254 return mInstrumentationTest.getDevice().pushFile(file, destinationPath); in pushFileToTestDevice()
261 if (mInstrumentationTest.getDevice().doesFileExist(pathToFile)) { in deleteTestFileFromDevice()
262 mInstrumentationTest.getDevice() in deleteTestFileFromDevice()
/tools/tradefederation/core/test_framework/com/android/tradefed/testtype/junit4/
DBaseHostJUnit4Test.java74 public final ITestDevice getDevice() { in getDevice() method in BaseHostJUnit4Test
75 return mTestInfo.getDevice(); in getDevice()
133 installPackage(getDevice(), apkFileName, options); in installPackage()
176 installPackageAsUser(getDevice(), apkFileName, grantPermission, userId, options); in installPackageAsUser()
227 return runDeviceTests(getDevice(), pkgName, testClassName, null); in runDeviceTests()
242 getDevice(), in runDeviceTests()
270 getDevice(), in runDeviceTests()
295 return runDeviceTests(getDevice(), pkgName, testClassName, testMethodName); in runDeviceTests()
312 getDevice(), in runDeviceTests()
469 options.getDevice() == null ? getDevice() : options.getDevice(), in runDeviceTests()
[all …]
/tools/tradefederation/contrib/src/com/android/media/tests/
DAudioLoopbackTest.java312 public ITestDevice getDevice() { in getDevice() method in AudioLoopbackTest
335 getDevice().stopLogcat(); in run()
359 getDevice().startLogcat(); in run()
501 getDevice().disableKeyguard(); in initializeTest()
502 getDevice().waitForDeviceAvailable(DEVICE_SYNC_MS); in initializeTest()
504 getDevice().setDate(new Date()); in initializeTest()
520 getDevice().executeAdbCommand("logcat", "-c"); in runTest()
521 final long deviceTestStartTime = getDevice().getDeviceDate(); in runTest()
523 getDevice() in runTest()
536 if (getDevice().doesFileExist(resultFilename)) { in runTest()
[all …]
DAdbScreenrecordTest.java111 public ITestDevice getDevice() { in getDevice() method in AdbScreenrecordTest
168 getDevice().executeShellCommand(cmd, receiver, timeout, TimeUnit.MILLISECONDS, 3); in runTest()
174 if (!waitForFile(getDevice(), timeout, deviceFileName)) { in runTest()
241 getDevice().executeShellCommand("rm -f " + deviceFileName); in deleteFileFromDevice()
255 IFileEntry video = getDevice().getFileEntry(deviceFileName); in extractDurationAndBitrateFromVideoFileUsingAvprobe()
260 final File recordedVideo = getDevice().pullFile(deviceFileName); in extractDurationAndBitrateFromVideoFileUsingAvprobe()
362 getDevice().disableKeyguard(); in initializeTest()
363 getDevice().waitForDeviceAvailable(DEVICE_SYNC_MS); in initializeTest()
366 getDevice().setDate(new Date()); in initializeTest()
DVideoMultimeterTest.java138 public ITestDevice getDevice() { in getDevice() method in VideoMultimeterTest
144 if (!getDevice().getProductType().contains("manta")) { in rotateScreen()
145 getDevice().executeShellCommand(ROTATE_LANDSCAPE); in rotateScreen()
159 getDevice().executeShellCommand(String.format( in startPlayback()
203 getDevice().executeShellCommand(mCmdStopVideo); in doCalibration()
212 getDevice().setDate(new Date()); in setupTestEnv()
244 getDevice().clearErrorDialogs(); in doMeasurement()
268 getDevice().executeShellCommand(mCmdStopVideo); in doMeasurement()
269 getDevice().clearErrorDialogs(); in doMeasurement()
DCameraTestBase.java190 instr.setDevice(getDevice()); in runInstrumentationTest()
526 getDevice().executeShellCommand(command, receiver, in dumpMeminfo()
669 result = getDevice().executeShellCommand(String.format(PGREP_COMMAND_FORMAT, in getPid()
683 uptime = getDevice().executeShellCommand("cat /proc/uptime").split(" ")[0]; in getUptime()
698 String result = getDevice().executeShellCommand(String.format(commandFormat, pid)); in dumpThreadCount()
721 String result = getDevice().executeShellCommand(DUMP_ION_HEAPS_COMMAND); in dumpIonHeaps()
745 public ITestDevice getDevice() { in getDevice() method in CameraTestBase
/tools/tradefederation/core/src/com/android/tradefed/targetprep/
DInstallApexModuleTargetPreparer.java95 ITestDevice device = testInfo.getDevice(); in setUp()
168 ITestDevice device = testInfo.getDevice(); in tearDown()
200 testInfo.getDevice().getDeviceDescriptor(), in initBundletoolUtil()
238 initDeviceSpecFilePath(testInfo.getDevice()); in getSplitsForApks()
244 testInfo.getDevice(), in getSplitsForApks()
265 ITestDevice device = testInfo.getDevice(); in getModulesToInstall()
358 ITestDevice device = testInfo.getDevice(); in installTrain()
416 initDeviceSpecFilePath(testInfo.getDevice()); in installUsingBundleTool()
443 ITestDevice device = testInfo.getDevice(); in installSingleModuleUsingBundletool()
474 ITestDevice device = testInfo.getDevice(); in installMultipleModuleUsingBundletool()
[all …]
DTestAppInstallSetup.java253 testInfo.getDevice().getDeviceDescriptor(), in getLocalPathForFilename()
292 abiName = AbiFormatter.getDefaultAbi(getDevice(), mForceAbi); in setUp()
296 if (abiName != null && testInfo.getDevice().getApiLevel() > 20) { in setUp()
312 if (mForceQueryable && getDevice().isAppEnumerationSupported()) { in setUp()
320 findApkFiles(testAppName, testInfo.getDevice().getDeviceDescriptor())); in setUp()
338 public ITestDevice getDevice() throws TargetSetupError { in getDevice() method in TestAppInstallSetup
339 return mTestInfo.getDevice(); in getDevice()
376 uninstallPackage(getDevice(), packageName); in tearDown()
411 ITestDevice device = testInfo.getDevice(); in installer()
460 ITestDevice device = testInfo.getDevice(); in resolveApkFiles()
/tools/tradefederation/contrib/src/com/android/performance/tests/
DAppTransitionTests.java188 new LogcatReceiver(getDevice(), EVENTS_CMD, EVENTS_LOGCAT_SIZE, 0); in run()
205 new LogcatReceiver(getDevice(), EVENTS_CMD, EVENTS_LOGCAT_SIZE, 0); in run()
225 new LogcatReceiver(getDevice(), EVENTS_CMD, EVENTS_LOGCAT_SIZE, 0); in run()
245 new LogcatReceiver(getDevice(), EVENTS_CMD, EVENTS_LOGCAT_SIZE, 0); in run()
262 new LogcatReceiver(getDevice(), EVENTS_CMD, EVENTS_LOGCAT_SIZE, 0); in run()
297 getDevice() in addDropCacheScriptFile()
306 getDevice() in addDropCacheScriptFile()
346 if (!mIsolatedStorage && getDevice().checkApiLevelAgainstNextRelease(29)) { in createRemoteAndroidTestRunner()
373 getDevice().executeShellCommand("pm list instrumentation", parser); in queryRunnerName()
392 new RemoteAndroidTestRunner(mPackage, mRunnerName, getDevice().getIDevice()); in createTestRunner()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/presubmit/
DDeviceStateTransitionFuncTests.java40 getDevice().reboot(); in setUp()
45 assertEquals(TestDeviceState.ONLINE, getDevice().getDeviceState()); in testFastbootTransition()
46 getDevice().rebootIntoBootloader(); in testFastbootTransition()
47 assertEquals(TestDeviceState.FASTBOOT, getDevice().getDeviceState()); in testFastbootTransition()
49 getDevice().reboot(); in testFastbootTransition()
50 assertEquals(TestDeviceState.ONLINE, getDevice().getDeviceState()); in testFastbootTransition()
54 assertEquals(TestDeviceState.ONLINE, getDevice().getDeviceState()); in testFastbootTransition()
/tools/test/graphicsbenchmark/functional_tests/hostside/src/com/android/game/qualification/test/
DMemoryTests.java53 TestUtils.assumeGameCoreCertified(getDevice()); in setUp()
62 getDevice().startLogcat(); in testMemoryAllocationLimit()
68 getDevice().clearLogcat(); in testMemoryAllocationLimit()
72 getDevice().executeShellCommand("am start -W " + pkgname + "/" + actname); in testMemoryAllocationLimit()
75 …while((getDevice().executeShellCommand("dumpsys activity | grep top-activity")).contains("allocstr… in testMemoryAllocationLimit()
81 InputStreamSource logcatSource = getDevice().getLogcat(); in testMemoryAllocationLimit()
100 getDevice().stopLogcat(); in testMemoryAllocationLimit()
/tools/tradefederation/core/util-apps/ContentProvider/hostsidetests/src/com/android/tradefed/contentprovider/
DContentProviderTest.java47 mHandler = new ContentProviderHandler(getDevice()); in setUp()
49 String.format(EXTERNAL_STORAGE_PATH, getDevice().getCurrentUser()); in setUp()
56 getDevice().deleteFile(delete); in tearDown()
72 assertTrue(getDevice().doesFileExist(mCurrentUserStoragePath + tmpFile.getName())); in testPushFile_encode()
89 assertTrue(getDevice().doesFileExist(mCurrentUserStoragePath + tmpFile.getName())); in testPushFile_encode_plus()
103 assertTrue(getDevice().doesFileExist(mCurrentUserStoragePath + tmpFile.getName())); in testPushFile()
118 assertTrue(getDevice().doesFileExist(mCurrentUserStoragePath + tmpFile.getName())); in testDeleteFile()
/tools/tradefederation/core/tests/src/com/android/tradefed/device/recovery/
DUsbResetMultiDeviceRecoveryTest.java91 verify(mUsb, never()).getDevice(any()); in testRecover_stub()
103 verify(mUsb.getDevice(SERIAL), never()).reset(); in testRecover_available()
116 verify(mUsb.getDevice(SERIAL), times(1)).reset(); in testRecover_unavailable()
130 verify(mUsb.getDevice(SERIAL), never()).reset(); in testRecover_fastboot_allocated()
144 verify(mUsb.getDevice(SERIAL), times(1)).reset(); in testRecover_fastboot_unallocated()
156 verify(mUsb.getDevice(SERIAL), times(1)).reset(); in testRecover_notManaged()
169 verify(mUsb.getDevice(SERIAL), never()).reset(); in testRecover_notConnected()
/tools/tradefederation/core/src/com/android/tradefed/invoker/
DInvocationExecution.java128 ITestDevice device = testInfo.getContext().getDevice(currentDeviceName); in fetchBuild()
293 reportLogs(testInfo.getContext().getDevice(deviceName), listener, Stage.SETUP); in doSetup()
305 ITestDevice device = testInfo.getContext().getDevice(deviceName); in runPreparationOnDevice()
308 ((ITestLoggerReceiver) testInfo.getContext().getDevice(deviceName)) in runPreparationOnDevice()
342 ITestDevice device = context.getDevice(deviceName); in runDevicePreInvocationSetup()
346 ((ITestLoggerReceiver) context.getDevice(deviceName)).setTestLogger(logger); in runDevicePreInvocationSetup()
368 ITestDevice device = context.getDevice(deviceName); in runDevicePostInvocationTearDown()
465 ITestDevice device = context.getDevice(deviceName); in doTeardown()
570 ((IDeviceTest) test).setDevice(info.getDevice()); in runTests()
/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/
DAppSetupFuncTest.java52 public ITestDevice getDevice() { in getDevice() method in AppSetupFuncTest
60 getDevice().uninstallPackage(WifiHelper.INSTRUMENTATION_PKG); in testSetupTeardown()
69 appSetup.setUp(getDevice(), appBuild); in testSetupTeardown()
70 assertTrue(getDevice().getUninstallablePackageNames().contains( in testSetupTeardown()
72 appSetup.tearDown(getDevice(), appBuild, null); in testSetupTeardown()
73 assertFalse(getDevice().getUninstallablePackageNames().contains( in testSetupTeardown()
DDeviceSetupFuncTest.java49 public ITestDevice getDevice() { in getDevice() method in DeviceSetupFuncTest
71 getDevice().executeShellCommand("setprop ro.audio.silent 0"); in testSetup()
73 assertTrue(getDevice().executeShellCommand("getprop ro.audio.silent").contains("1")); in testSetup()
74 assertTrue(getDevice().executeShellCommand("getprop ro.monkey").contains("1")); in testSetup()
75 assertTrue(getDevice().executeShellCommand("getprop ro.test_harness").contains("1")); in testSetup()
77 assertTrue(getDevice().executeShellCommand("id").contains("root")); in testSetup()
DDefaultTestsZipInstallerFuncTest.java35 getDevice().enableAdbRoot(); in testDeleteData()
36 getDevice().executeShellCommand("stop"); in testDeleteData()
38 mZipInstaller.deleteData(getDevice()); in testDeleteData()
40 getDevice().reboot(); in testDeleteData()
/tools/tradefederation/core/test_framework/com/android/tradefed/targetprep/
DFastbootCommandPreparer.java56 testInformation.getDevice().rebootIntoBootloader(); in setUp()
58 testInformation.getDevice().rebootIntoFastbootd(); in setUp()
67 testInformation.getDevice().executeFastbootCommand(cmd.split("\\s+")); in setUp()
71 testInformation.getDevice().reboot(); in setUp()
79 testInformation.getDevice().reboot(); in tearDown()
/tools/tradefederation/contrib/src/com/android/monkey/
DMonkeyBase.java298 Assert.assertNotNull(getDevice()); in run()
329 ITestDevice device = getDevice(); in runMonkey()
345 getDevice().executeShellCommand(String.format(getAppCmdWithExtras(), componentName)); in runMonkey()
378 CircularAtraceUtil.startTrace(getDevice(), null, 10); in runMonkey()
408 atraceStream = CircularAtraceUtil.endTrace(getDevice()); in runMonkey()
705 public ITestDevice getDevice() { in getDevice() method in MonkeyBase

12345678