Home
last modified time | relevance | path

Searched refs:mTestDevice (Results 1 – 25 of 32) sorted by relevance

12

/tools/tradefederation/core/tests/src/com/android/tradefed/device/
DTestDeviceTest.java96 private TestDevice mTestDevice; field in TestDeviceTest
150 mTestDevice = in setUp()
162 mTestDevice.setRecovery(mMockRecovery); in setUp()
163 mTestDevice.setCommandTimeout(100); in setUp()
164 mTestDevice.setLogStartDelay(-1); in setUp()
186 assertTrue(mTestDevice.enableAdbRoot()); in testEnableAdbRoot_alreadyRoot()
195 assertTrue(mTestDevice.enableAdbRoot()); in testEnableAdbRoot_notRoot()
202 boolean enableRoot = mTestDevice.getOptions().isEnableAdbRoot(); in testEnableAdbRoot_noEnableRoot()
203 OptionSetter setter = new OptionSetter(mTestDevice.getOptions()); in testEnableAdbRoot_noEnableRoot()
206 assertFalse(mTestDevice.enableAdbRoot()); in testEnableAdbRoot_noEnableRoot()
[all …]
DNativeDeviceTest.java92 private TestableAndroidNativeDevice mTestDevice; field in NativeDeviceTest
141 mTestDevice = new TestableAndroidNativeDevice() { in setUp()
157 mTestDevice.setRecovery(mMockRecovery); in setUp()
158 mTestDevice.setCommandTimeout(100); in setUp()
159 mTestDevice.setLogStartDelay(-1); in setUp()
169 mTestDevice.installPackage(new File(""), false); in testInstallPackages_exception()
182 mTestDevice.uninstallPackage(""); in testUninstallPackages_exception()
196 mTestDevice.installPackage(new File(""), false, false); in testInstallPackagesBool_exception()
210 mTestDevice.installPackageForUser(new File(""), false, 0); in testInstallPackagesForUser_exception()
224 mTestDevice.installPackageForUser(new File(""), false, false, 0); in testInstallPackagesForUserWithPermission_exception()
[all …]
DTestDeviceFuncTest.java71 private TestDevice mTestDevice; field in TestDeviceFuncTest
78 mTestDevice = (TestDevice) device; in setDevice()
83 return mTestDevice; in getDevice()
88 mMonitor = mTestDevice.getDeviceStateMonitor(); in setUp()
90 mTestDevice.waitForDeviceAvailable(); in setUp()
96 InputStreamSource bugreport = mTestDevice.getBugreport(); in testBugreport()
112 if (mTestDevice.getApiLevel() < 24) { in testBugreportz()
118 f = (FileInputStreamSource) mTestDevice.getBugreportz(); in testBugreportz()
149 final String output = mTestDevice.executeShellCommand("ls"); in assertSimpleShellCommand()
172 mTestDevice.uninstallPackage(WifiHelper.INSTRUMENTATION_PKG); in assertWifiApkInstall()
[all …]
DTestDeviceStressTest.java48 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 …]
DRemoteAndroidDeviceTest.java45 private RemoteAndroidDevice mTestDevice; field in RemoteAndroidDeviceTest
76 mTestDevice = new TestableRemoteAndroidDevice(); in setUp()
77 mTestDevice.setRecovery(mMockRecovery); in setUp()
96 assertTrue(mTestDevice.adbTcpConnect("localhost", "1234")); in testAdbConnect()
111 assertFalse(mTestDevice.adbTcpConnect("localhost", "1234")); in testAdbConnect_fails()
130 assertFalse(mTestDevice.adbTcpConnect("localhost", "1234")); in testAdbConnect_fails_confirmation()
142 assertTrue(mTestDevice.adbTcpDisconnect("localhost", "1234")); in testAdbDisconnect()
154 assertFalse(mTestDevice.adbTcpDisconnect("localhost", "1234")); in testAdbDisconnect_fails()
160 assertEquals("localhost", mTestDevice.getHostName()); in testCheckSerial()
161 assertEquals("1234", mTestDevice.getPortNum()); in testCheckSerial()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/device/cloud/
DRemoteAndroidVirtualDeviceTest.java77 private RemoteAndroidVirtualDevice mTestDevice; field in RemoteAndroidVirtualDeviceTest
135 mTestDevice = new TestableRemoteAndroidVirtualDevice(); in setUp()
136 mTestDevice.setRecovery(mMockRecovery); in setUp()
146 FileUtil.deleteFile(mTestDevice.getExecuteShellCommandLog()); in tearDown()
158 mTestDevice = in testExceptionFromParser()
191 mTestDevice.launchGce(mMockBuildInfo); in testExceptionFromParser()
207 mTestDevice.waitForTunnelOnline(WAIT_FOR_TUNNEL_TIMEOUT); in testWaitForTunnelOnline()
222 mTestDevice.waitForTunnelOnline(WAIT_FOR_TUNNEL_TIMEOUT); in testWaitForTunnelOnline_notOnline()
239 mTestDevice.waitForTunnelOnline(WAIT_FOR_TUNNEL_TIMEOUT); in testWaitForTunnelOnline_tunnelTerminated()
254 mTestDevice = in testPreInvocationSetup()
[all …]
/tools/tradefederation/core/src/com/android/tradefed/testtype/
DDeviceBatteryLevelChecker.java49 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/core/tests/src/com/android/tradefed/util/statsd/
DMetricUtilTest.java153 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()
191 when(mTestDevice.checkApiLevelAgainstNextRelease(MetricUtil.SDK_VERSION_Q)) in testEmptyMetricReportList()
197 .when(mTestDevice) in testEmptyMetricReportList()
205 List<EventMetricData> data = MetricUtil.getEventMetricData(mTestDevice, CONFIG_ID); in testEmptyMetricReportList()
217 when(mTestDevice.checkApiLevelAgainstNextRelease(MetricUtil.SDK_VERSION_Q)) in testMultipleReportsInReportList_differentAtoms()
223 .when(mTestDevice) in testMultipleReportsInReportList_differentAtoms()
[all …]
DConfigUtilTest.java53 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 …]
/tools/tradefederation/contrib/src/com/android/performance/tests/
DEmmcPerformanceTest.java114 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 …]
DHermeticMemoryTest.java96 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/
DMediaMemoryTest.java67 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 …]
DVideoEditingMemoryTest.java67 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 …]
DCameraShotToShotLatencyTest.java60 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 …]
DPanoramaBenchMarkTest.java42 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 …]
DCameraSettingsTest.java75 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 …]
DCameraLatencyTest.java62 ITestDevice mTestDevice = null; field in CameraLatencyTest
147 Assert.assertNotNull(mTestDevice); in run()
161 mTestDevice.getIDevice()); in executeTest()
169 mTestDevice.runInstrumentationTests(runner, listener, auxListener); in executeTest()
175 InputStreamSource bugreport = mTestDevice.getBugreport(); in executeTest()
188 String extStore = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); in cleanTmpFiles()
190 mTestDevice.executeShellCommand(String.format("rm %s/DCIM/Camera/*", extStore)); in cleanTmpFiles()
191 mTestDevice.executeShellCommand(String.format("rm %s/%s", extStore, mOutputPath)); in cleanTmpFiles()
203 outputFile = mTestDevice.pullFileFromExternal(mOutputPath); in logOutputFile()
282 mTestDevice = device; in setDevice()
[all …]
DCameraStressTest.java65 ITestDevice mTestDevice = null; field in CameraStressTest
176 Assert.assertNotNull(mTestDevice); in run()
190 TEST_RUNNER, mTestDevice.getIDevice()); in executeTest()
204 mTestDevice.runInstrumentationTests(runner, listener, auxListener); in executeTest()
210 InputStreamSource bugreport = mTestDevice.getBugreport(); in executeTest()
223 String extStore = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); in cleanTmpFiles()
224 mTestDevice.executeShellCommand(String.format("rm -r %s/DCIM/Camera", extStore)); in cleanTmpFiles()
225 mTestDevice.executeShellCommand(String.format("rm %s/%s", extStore, mOutputPath)); in cleanTmpFiles()
238 outputFile = mTestDevice.pullFileFromExternal(mOutputPath); in logOutputFiles()
363 mTestDevice = device; in setDevice()
[all …]
DMediaPlayerStressTest.java67 ITestDevice mTestDevice = null; field in MediaPlayerStressTest
96 Assert.assertNotNull(mTestDevice); in run()
98 TEST_RUNNER_NAME, mTestDevice.getIDevice()); in run()
103 mTestDevice); in run()
109 mTestDevice.runInstrumentationTests(runner, bugListener); in run()
119 String extStore = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE); in cleanResultFile()
120 mTestDevice.executeShellCommand(String.format("rm %s/%s", extStore, mOutputPath)); in cleanResultFile()
132 outputFile = mTestDevice.pullFileFromExternal(mOutputPath); in logOutputFile()
206 mTestDevice = device; in setDevice()
211 return mTestDevice; in getDevice()
DMediaStressTest.java58 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()
DVideoEditingPerformanceTest.java64 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/contrib/src/com/android/monkey/
DMonkeyBase.java289 private ITestDevice mTestDevice = null; field in MonkeyBase
388 mTestDevice.getBuildId(), in runMonkey()
389 mTestDevice.getBuildFlavor(), in runMonkey()
390 mTestDevice.getSerialNumber()); in runMonkey()
395 commandHelper.runCommand(mTestDevice, command, getMonkeyTimeoutMs()); in runMonkey()
399 mTestDevice.waitForDeviceOnline(); in runMonkey()
400 mTestDevice.enableAdbRoot(); in runMonkey()
498 try (InputStreamSource screenshot = mTestDevice.getScreenshot("JPEG")) { in takeScreenshot()
506 Bugreport bugreport = mTestDevice.takeBugreport(); in takeBugreport()
537 DeviceFileReporter dfr = new DeviceFileReporter(mTestDevice, listener); in takeTraces()
[all …]
/tools/tradefederation/contrib/src/com/android/wireless/tests/
DWifiStressTest.java57 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/core/src/com/android/tradefed/device/
DBackgroundDeviceAction.java47 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/tests/src/com/android/scenario/
DAppSetupTest.java48 @Mock ITestDevice mTestDevice; field in AppSetupTest
55 doReturn(mTestDevice).when(mAppSetup).getDevice(); in setUp()
65 verify(mTestDevice).executeShellCommand(eq(AppSetup.DROP_CACHE_COMMAND)); in testDropCachesOption_set()
72 verify(mTestDevice, never()).executeShellCommand(eq(AppSetup.DROP_CACHE_COMMAND)); in testDropCachesOption_notSet()
81 verify(mTestDevice, times(2)) in testKillAppsOption()
84 verify(mTestDevice, times(1)) in testKillAppsOption()
86 verify(mTestDevice, times(1)) in testKillAppsOption()

12