Home
last modified time | relevance | path

Searched refs:testDevice (Results 1 – 24 of 24) sorted by relevance

/tools/tradefederation/core/src/com/android/tradefed/device/
DManagedTestDeviceFactory.java67 IManagedTestDevice testDevice = null; in createRequestedDevice() local
69 testDevice = in createRequestedDevice()
74 testDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in createRequestedDevice()
77 testDevice = in createRequestedDevice()
82 testDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in createRequestedDevice()
84 return testDevice; in createRequestedDevice()
92 IManagedTestDevice testDevice = null; in createDevice() local
94 testDevice = in createDevice()
99 testDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in createDevice()
101 testDevice = in createDevice()
[all …]
DDeviceManager.java443 private void checkAndAddAvailableDevice(final IManagedTestDevice testDevice) { in checkAndAddAvailableDevice() argument
444 if (mGlobalDeviceFilter != null && !mGlobalDeviceFilter.matches(testDevice.getIDevice())) { in checkAndAddAvailableDevice()
446 testDevice.getSerialNumber()); in checkAndAddAvailableDevice()
453 mManagedDeviceList.handleDeviceEvent(testDevice, DeviceEvent.AVAILABLE_CHECK_IGNORED); in checkAndAddAvailableDevice()
457 final String threadName = String.format("Check device %s", testDevice.getSerialNumber()); in checkAndAddAvailableDevice()
461 CLog.d("checking new '%s' '%s' responsiveness", testDevice.getClass().getName(), in checkAndAddAvailableDevice()
462 testDevice.getSerialNumber()); in checkAndAddAvailableDevice()
463 if (testDevice.getMonitor().waitForDeviceShell(CHECK_WAIT_DEVICE_AVAIL_MS)) { in checkAndAddAvailableDevice()
464 DeviceEventResponse r = mManagedDeviceList.handleDeviceEvent(testDevice, in checkAndAddAvailableDevice()
468 testDevice.getSerialNumber()); in checkAndAddAvailableDevice()
[all …]
DFileEntryWrapper.java41 FileEntryWrapper(NativeDevice testDevice, FileEntry entry) { in FileEntryWrapper() argument
42 mTestDevice = testDevice; in FileEntryWrapper()
/tools/tradefederation/core/test_framework/com/android/tradefed/testtype/pandora/
DPtsBotTest.java323 ITestDevice testDevice = testInfo.getDevice(); in run() local
327 initFlagsConfig(testDevice, testsConfigFile); in run()
335 hostPandoraServerPort = adbForwardPort(testDevice, 0, PANDORA_SERVER_PORT); in run()
342 adbForwardVsockPort(testDevice, 0, ROOTCANAL_VSOCK_CID, HCI_ROOTCANAL_PORT_CF); in run()
345 testDevice, 0, ROOTCANAL_VSOCK_CID, CONTROL_ROOTCANAL_PORT_CF); in run()
350 testDevice, 0, MODEM_SIMULATOR_VSOCK_CID, MODEM_SIMULATOR_VSOCK_PORT); in run()
370 adbForwardRemovePort(testDevice, hostPandoraServerPort); in run()
372 adbForwardRemovePort(testDevice, hostHciRootcanalPort); in run()
373 adbForwardRemovePort(testDevice, hostControlRootcanalPort); in run()
374 adbForwardRemovePort(testDevice, hostModemSimulatorPort); in run()
[all …]
/tools/tradefederation/core/test_framework/com/android/tradefed/targetprep/
DRootcanalForwarderPreparer.java55 ITestDevice testDevice = testInformation.getDevice(); in setUp() local
56 mHostHciRootcanalPort = adbForward(testDevice, mHciPort); in setUp()
57 mHostControlRootcanalPort = adbForward(testDevice, mControlPort); in setUp()
83 ITestDevice testDevice = testInformation.getDevice(); in tearDown() local
86 adbForwardRemove(testDevice, mHostHciRootcanalPort); in tearDown()
88 adbForwardRemove(testDevice, mHostControlRootcanalPort); in tearDown()
94 private String adbForward(ITestDevice testDevice, String port) in adbForward() argument
96 String hostPort = testDevice.executeAdbCommand("forward", "tcp:0", port).trim(); in adbForward()
101 private void adbForwardRemove(ITestDevice testDevice, String hostPort) in adbForwardRemove() argument
104 testDevice.executeAdbCommand("forward", "--remove", String.format("tcp:%s", hostPort)); in adbForwardRemove()
/tools/tradefederation/core/test_framework/com/android/tradefed/testtype/
DGTest.java185 String root, ITestDevice testDevice, ITestInvocationListener listener) in doRunAllTestsInSubdirectory() argument
199 String[] executableFiles = getExecutableFiles(testDevice, root, excludeDirectories); in doRunAllTestsInSubdirectory()
207 CLog.i("Running gtest %s %s on %s", filePath, flags, testDevice.getSerialNumber()); in doRunAllTestsInSubdirectory()
209 runTestXml(testDevice, filePath, flags, listener); in doRunAllTestsInSubdirectory()
211 runTest(testDevice, resultParser, filePath, flags); in doRunAllTestsInSubdirectory()
273 protected void executeCommandByScript(final ITestDevice testDevice, final String cmd, in executeCommandByScript() argument
276 testDevice.pushString(String.format("#!/bin/bash\n%s", cmd), tmpFileDevice); in executeCommandByScript()
278 testDevice.executeShellCommand(String.format("chmod 755 %s", tmpFileDevice)); in executeCommandByScript()
279 testDevice.executeShellCommand( in executeCommandByScript()
285 testDevice.deleteFile(tmpFileDevice); in executeCommandByScript()
[all …]
DGoogleBenchmarkTest.java184 private void doRunAllTestsInSubdirectory(String root, ITestDevice testDevice, in doRunAllTestsInSubdirectory() argument
186 if (testDevice.isDirectory(root)) { in doRunAllTestsInSubdirectory()
188 for (String child : testDevice.getChildren(root)) { in doRunAllTestsInSubdirectory()
189 doRunAllTestsInSubdirectory(root + "/" + child, testDevice, listener); in doRunAllTestsInSubdirectory()
198 testDevice.executeShellCommand(String.format("chmod 755 %s", root)); in doRunAllTestsInSubdirectory()
204 Set<String> filteredTests = getFilteredTests(testDevice, root); in doRunAllTestsInSubdirectory()
227 CommandResult cmd_result = executeCommand(testDevice, cmd); in doRunAllTestsInSubdirectory()
247 private Set<String> getFilteredTests(ITestDevice testDevice, String fullBinaryPath) in getFilteredTests() argument
249 Set<String> filteredTests = getTestsForFilters(testDevice, fullBinaryPath, mIncludeFilters); in getFilteredTests()
252 getTestsForFilters(testDevice, fullBinaryPath, mExcludeFilters)); in getFilteredTests()
[all …]
DNativeStressTest.java147 IFileEntry rootEntry, ITestDevice testDevice, ITestInvocationListener listener) in doRunAllTestsInSubdirectory() argument
153 doRunAllTestsInSubdirectory(childEntry, testDevice, listener); in doRunAllTestsInSubdirectory()
162 testDevice.executeShellCommand(String.format("chmod 755 %s", fullPath)); in doRunAllTestsInSubdirectory()
173 testDevice.executeShellCommand(String.format("%s -s %d -e %d", fullPath, in doRunAllTestsInSubdirectory()
DNativeBenchmarkTest.java172 IFileEntry rootEntry, ITestDevice testDevice, ITestInvocationListener listener) in doRunAllTestsInSubdirectory() argument
178 doRunAllTestsInSubdirectory(childEntry, testDevice, listener); in doRunAllTestsInSubdirectory()
191 testDevice.executeShellCommand(String.format("chmod 755 %s", fullPath)); in doRunAllTestsInSubdirectory()
210 testDevice.executeShellCommand(cmd, resultParser, in doRunAllTestsInSubdirectory()
/tools/tradefederation/core/javatests/com/android/tradefed/device/
DTestDeviceTest.java640 TestDevice testDevice = in testRecoverDevice_ThrowException() local
647 testDevice.setRecovery( in testRecoverDevice_ThrowException()
674 testDevice.setRecoveryMode(RecoveryMode.AVAILABLE); in testRecoverDevice_ThrowException()
677 testDevice.recoverDevice(); in testRecoverDevice_ThrowException()
2863 TestDevice testDevice = newTestDeviceForReleaseApiLevel(28); in testListUsers_oneUser() local
2868 ArrayList<Integer> actual = testDevice.listUsers(); in testListUsers_oneUser()
2877 TestDevice testDevice = newTestDeviceForReleaseApiLevel(28); in testListUsers_invalidOutput() local
2883 testDevice.listUsers(); in testListUsers_invalidOutput()
2896 TestDevice testDevice = newTestDeviceForReleaseApiLevel(28); in testListUsers_unparsableOutput() local
2902 testDevice.listUsers(); in testListUsers_unparsableOutput()
[all …]
DNativeDeviceTest.java1416 TestableAndroidNativeDevice testDevice = in testIsNewer() local
1435 assertTrue(testDevice.isNewer(localFile, remoteFile)); in testIsNewer()
1447 TestableAndroidNativeDevice testDevice = in testIsNewer_timeOffset() local
1467 assertTrue(testDevice.isNewer(localFile, remoteFile)); in testIsNewer_timeOffset()
1479 TestableAndroidNativeDevice testDevice = in testIsNewer_fails() local
1498 assertFalse(testDevice.isNewer(localFile, remoteFile)); in testIsNewer_fails()
1659 NativeDevice testDevice = in testDoReboot() local
1669 testDevice.doReboot(RebootMode.REBOOT_FULL, null); in testDoReboot()
1676 NativeDevice testDevice = in testDoReboot_skipped() local
1691 testDevice.doReboot(RebootMode.REBOOT_FULL, null); in testDoReboot_skipped()
[all …]
DDeviceManagerTest.java486 IManagedTestDevice testDevice = mock(IManagedTestDevice.class); in testFreeDevice_noop() local
488 when(testDevice.getIDevice()).thenReturn(mockIDevice); in testFreeDevice_noop()
492 manager.freeDevice(testDevice, FreeDeviceState.AVAILABLE); in testFreeDevice_noop()
906 IManagedTestDevice testDevice = new TestDevice(mMockIDevice, mMockStateMonitor, null); in testFreeDevice_unavailable() local
915 return testDevice; in testFreeDevice_unavailable()
964 IManagedTestDevice testDevice = new TestDevice(mMockIDevice, mMockStateMonitor, null); in testFreeDevice_recovery() local
973 return testDevice; in testFreeDevice_recovery()
1026 IManagedTestDevice testDevice = new TestDevice(mMockIDevice, mMockStateMonitor, null); in testFreeDevice_unknown() local
1035 return testDevice; in testFreeDevice_unknown()
1088 IManagedTestDevice testDevice = new TestDevice(mMockIDevice, mMockStateMonitor, null); in testFreeDevice_unknown_subName() local
[all …]
/tools/tradefederation/core/javatests/com/android/tradefed/device/metric/
DRuntimeRestartCollectorTest.java123 ITestDevice testDevice = mockTestDevice(DEVICE_SERIAL_1); in testStatsdInteractions_singleDevice() local
124 doReturn(Arrays.asList(testDevice)).when(mContext).getDevices(); in testStatsdInteractions_singleDevice()
140 eq(testDevice), in testStatsdInteractions_singleDevice()
142 verify(mCollector, times(1)).getStatsdMetadata(eq(testDevice)); in testStatsdInteractions_singleDevice()
145 verify(mCollector, times(1)).getEventMetricData(eq(testDevice), eq(CONFIG_ID_1)); in testStatsdInteractions_singleDevice()
146 verify(mCollector, times(1)).removeConfig(eq(testDevice), eq(CONFIG_ID_1)); in testStatsdInteractions_singleDevice()
147 verify(mCollector, times(2)).getStatsdMetadata(eq(testDevice)); in testStatsdInteractions_singleDevice()
204 ITestDevice testDevice = mockTestDevice(DEVICE_SERIAL_1); in testAddingMetrics_noRuntimeRestart_noPriorRuntimeRestart() local
205 doReturn(Arrays.asList(testDevice)).when(mContext).getDevices(); in testAddingMetrics_noRuntimeRestart_noPriorRuntimeRestart()
241 ITestDevice testDevice = mockTestDevice(DEVICE_SERIAL_1); in testAddingMetrics_noRuntimeRestart_withPriorRuntimeRestart() local
[all …]
DRebootReasonCollectorTest.java73 ITestDevice testDevice = mockTestDevice(DEVICE_SERIAL_1); in testStatsdInteractions_singleDevice() local
74 when(mContext.getDevices()).thenReturn(Arrays.asList(testDevice)); in testStatsdInteractions_singleDevice()
88 eq(testDevice), in testStatsdInteractions_singleDevice()
90 verify(mCollector, times(1)).getEventMetricData(eq(testDevice), eq(CONFIG_ID_1)); in testStatsdInteractions_singleDevice()
91 verify(mCollector, times(1)).removeConfig(eq(testDevice), eq(CONFIG_ID_1)); in testStatsdInteractions_singleDevice()
97 ITestDevice testDevice = mockTestDevice(DEVICE_SERIAL_1); in testAddingMetrics_singleDevice() local
98 when(mContext.getDevices()).thenReturn(Arrays.asList(testDevice)); in testAddingMetrics_singleDevice()
291 ITestDevice testDevice = mockTestDevice(DEVICE_SERIAL_1); in testCountOnlyWhenNoReboots() local
292 when(mContext.getDevices()).thenReturn(Arrays.asList(testDevice)); in testCountOnlyWhenNoReboots()
/tools/tradefederation/core/src/com/android/tradefed/invoker/
DInvocationContext.java103 public void addAllocatedDevice(String devicename, ITestDevice testDevice) { in addAllocatedDevice() argument
104 mNameAndDeviceMap.put(devicename, testDevice); in addAllocatedDevice()
107 mAllocatedDeviceAndBuildMap.put(testDevice, mNameAndBuildinfoMap.get(devicename)); in addAllocatedDevice()
156 for (ITestDevice testDevice : mNameAndDeviceMap.values()) { in getSerials()
157 listSerials.add(testDevice.getSerialNumber()); in getSerials()
192 public IBuildInfo getBuildInfo(ITestDevice testDevice) { in getBuildInfo() argument
193 return mAllocatedDeviceAndBuildMap.get(testDevice); in getBuildInfo()
241 for (ITestDevice testDevice : mNameAndDeviceMap.values()) { in getDeviceBySerial()
242 if (testDevice.getSerialNumber().equals(serial)) { in getDeviceBySerial()
243 return testDevice; in getDeviceBySerial()
DTestInvocation.java823 for (ITestDevice testDevice : context.getDevices()) { in logDeviceBatteryLevel()
824 if (testDevice == null) { in logDeviceBatteryLevel()
827 if (testDevice.getIDevice() instanceof StubDevice) { in logDeviceBatteryLevel()
830 if (testDevice instanceof RemoteAndroidVirtualDevice in logDeviceBatteryLevel()
831 || testDevice instanceof NestedRemoteDevice) { in logDeviceBatteryLevel()
836 Integer batteryLevel = testDevice.getBattery(); in logDeviceBatteryLevel()
838 CLog.v("Failed to get battery level for %s", testDevice.getSerialNumber()); in logDeviceBatteryLevel()
842 context.getBuildInfo(testDevice) in logDeviceBatteryLevel()
846 testDevice.getSerialNumber(), in logDeviceBatteryLevel()
/tools/tradefederation/contrib/src/com/android/aetest/tradefed/targetprep/
DAeTestManagedProfileCreator.java155 public void tearDown(ITestDevice testDevice, IBuildInfo buildInfo, Throwable throwable) in tearDown() argument
157 mInstallPreparer.tearDown(testDevice, buildInfo, throwable); in tearDown()
158 testDevice.removeUser(mManagedProfileUserId); in tearDown()
/tools/tradefederation/core/src/com/android/tradefed/result/
DJsonHttpTestResultReporter.java145 protected void parseAdditionalDeviceDetails(ITestDevice testDevice) { in parseAdditionalDeviceDetails() argument
148 mDeviceName = testDevice.getProperty(DEVICE_NAME_PROPERTY); in parseAdditionalDeviceDetails()
153 testDevice.getProperty(SDK_VERSION_PROPERTY), in parseAdditionalDeviceDetails()
154 testDevice.getProperty(BUILD_ID_PROPERTY).charAt(0)); in parseAdditionalDeviceDetails()
DBugreportCollector.java213 public BugreportCollector(ITestInvocationListener listener, ITestDevice testDevice) { in BugreportCollector() argument
217 if (testDevice == null) { in BugreportCollector()
221 mTestDevice = testDevice; in BugreportCollector()
/tools/tradefederation/core/invocation_interfaces/com/android/tradefed/invoker/
DIInvocationContext.java61 public void addAllocatedDevice(String deviceName, ITestDevice testDevice); in addAllocatedDevice() argument
128 public IBuildInfo getBuildInfo(ITestDevice testDevice); in getBuildInfo() argument
/tools/tradefederation/core/src/com/android/tradefed/targetprep/
DTestAppInstallSetup.java585 ITestDevice testDevice, String packageName, List<File> apkFiles) in installSinglePackage() argument
593 String result = installPackage(testDevice, apkFiles); in installSinglePackage()
598 uninstallPackage(testDevice, packageName); in installSinglePackage()
599 result = installPackage(testDevice, apkFiles); in installSinglePackage()
607 packageName, apkFiles, testDevice.getSerialNumber(), result), in installSinglePackage()
608 testDevice.getDeviceDescriptor(), in installSinglePackage()
/tools/tradefederation/contrib/src/com/android/graphics/tests/
DFlatlandTest.java112 public void setDevice(ITestDevice testDevice) { in setDevice() argument
113 mTestDevice = testDevice; in setDevice()
/tools/tradefederation/contrib/src/com/android/wireless/tests/
DWifiStressTest.java208 public void setDevice(ITestDevice testDevice) { in setDevice() argument
209 mTestDevice = testDevice; in setDevice()
/tools/tradefederation/core/javatests/com/android/tradefed/testtype/
DNativeBenchmarkTestTest.java114 ITestDevice testDevice, in testRun_setMaxFrequency()