/tools/tradefederation/core/src/com/android/tradefed/device/ |
D | ManagedTestDeviceFactory.java | 67 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 …]
|
D | DeviceManager.java | 443 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 …]
|
D | FileEntryWrapper.java | 41 FileEntryWrapper(NativeDevice testDevice, FileEntry entry) { in FileEntryWrapper() argument 42 mTestDevice = testDevice; in FileEntryWrapper()
|
/tools/tradefederation/core/test_framework/com/android/tradefed/testtype/pandora/ |
D | PtsBotTest.java | 287 ITestDevice testDevice = testInfo.getDevice(); in run() local 291 hostPandoraServerPort = adbForwardPort(testDevice, 0, PANDORA_SERVER_PORT); in run() 298 adbForwardVsockPort(testDevice, 0, ROOTCANAL_VSOCK_CID, HCI_ROOTCANAL_PORT_CF); in run() 301 testDevice, 0, ROOTCANAL_VSOCK_CID, CONTROL_ROOTCANAL_PORT_CF); in run() 306 testDevice, 0, MODEM_SIMULATOR_VSOCK_CID, MODEM_SIMULATOR_VSOCK_PORT); in run() 326 adbForwardRemovePort(testDevice, hostPandoraServerPort); in run() 328 adbForwardRemovePort(testDevice, hostHciRootcanalPort); in run() 329 adbForwardRemovePort(testDevice, hostControlRootcanalPort); in run() 330 adbForwardRemovePort(testDevice, hostModemSimulatorPort); in run() 488 private void toggleA2dpSinkIfNeeded(ITestDevice testDevice, String testName) { in toggleA2dpSinkIfNeeded() argument [all …]
|
/tools/tradefederation/core/test_framework/com/android/tradefed/testtype/ |
D | GTest.java | 185 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 …]
|
D | GoogleBenchmarkTest.java | 184 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 …]
|
D | NativeStressTest.java | 147 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()
|
D | NativeBenchmarkTest.java | 172 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/test_framework/com/android/tradefed/targetprep/ |
D | RootcanalForwarderPreparer.java | 55 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/javatests/com/android/tradefed/device/ |
D | TestDeviceTest.java | 641 TestDevice testDevice = in testRecoverDevice_ThrowException() local 648 testDevice.setRecovery( in testRecoverDevice_ThrowException() 675 testDevice.setRecoveryMode(RecoveryMode.AVAILABLE); in testRecoverDevice_ThrowException() 678 testDevice.recoverDevice(); in testRecoverDevice_ThrowException() 2864 TestDevice testDevice = newTestDeviceForReleaseApiLevel(28); in testListUsers_oneUser() local 2869 ArrayList<Integer> actual = testDevice.listUsers(); in testListUsers_oneUser() 2878 TestDevice testDevice = newTestDeviceForReleaseApiLevel(28); in testListUsers_invalidOutput() local 2884 testDevice.listUsers(); in testListUsers_invalidOutput() 2897 TestDevice testDevice = newTestDeviceForReleaseApiLevel(28); in testListUsers_unparsableOutput() local 2903 testDevice.listUsers(); in testListUsers_unparsableOutput() [all …]
|
D | NativeDeviceTest.java | 1239 TestableAndroidNativeDevice testDevice = in testIsNewer() local 1258 assertTrue(testDevice.isNewer(localFile, remoteFile)); in testIsNewer() 1270 TestableAndroidNativeDevice testDevice = in testIsNewer_timeOffset() local 1290 assertTrue(testDevice.isNewer(localFile, remoteFile)); in testIsNewer_timeOffset() 1302 TestableAndroidNativeDevice testDevice = in testIsNewer_fails() local 1321 assertFalse(testDevice.isNewer(localFile, remoteFile)); in testIsNewer_fails() 1482 NativeDevice testDevice = in testDoReboot() local 1492 testDevice.doReboot(RebootMode.REBOOT_FULL, null); in testDoReboot() 1499 NativeDevice testDevice = in testDoReboot_skipped() local 1514 testDevice.doReboot(RebootMode.REBOOT_FULL, null); in testDoReboot_skipped() [all …]
|
D | DeviceManagerTest.java | 481 IManagedTestDevice testDevice = mock(IManagedTestDevice.class); in testFreeDevice_noop() local 483 when(testDevice.getIDevice()).thenReturn(mockIDevice); in testFreeDevice_noop() 487 manager.freeDevice(testDevice, FreeDeviceState.AVAILABLE); in testFreeDevice_noop() 901 IManagedTestDevice testDevice = new TestDevice(mMockIDevice, mMockStateMonitor, null); in testFreeDevice_unavailable() local 910 return testDevice; in testFreeDevice_unavailable() 959 IManagedTestDevice testDevice = new TestDevice(mMockIDevice, mMockStateMonitor, null); in testFreeDevice_recovery() local 968 return testDevice; in testFreeDevice_recovery() 1021 IManagedTestDevice testDevice = new TestDevice(mMockIDevice, mMockStateMonitor, null); in testFreeDevice_unknown() local 1030 return testDevice; in testFreeDevice_unknown() 1083 IManagedTestDevice testDevice = new TestDevice(mMockIDevice, mMockStateMonitor, null); in testFreeDevice_unknown_subName() local [all …]
|
/tools/tradefederation/core/javatests/com/android/tradefed/device/metric/ |
D | RuntimeRestartCollectorTest.java | 123 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 …]
|
D | RebootReasonCollectorTest.java | 73 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/ |
D | InvocationContext.java | 101 public void addAllocatedDevice(String devicename, ITestDevice testDevice) { in addAllocatedDevice() argument 102 mNameAndDeviceMap.put(devicename, testDevice); in addAllocatedDevice() 105 mAllocatedDeviceAndBuildMap.put(testDevice, mNameAndBuildinfoMap.get(devicename)); in addAllocatedDevice() 154 for (ITestDevice testDevice : mNameAndDeviceMap.values()) { in getSerials() 155 listSerials.add(testDevice.getSerialNumber()); in getSerials() 190 public IBuildInfo getBuildInfo(ITestDevice testDevice) { in getBuildInfo() argument 191 return mAllocatedDeviceAndBuildMap.get(testDevice); in getBuildInfo() 239 for (ITestDevice testDevice : mNameAndDeviceMap.values()) { in getDeviceBySerial() 240 if (testDevice.getSerialNumber().equals(serial)) { in getDeviceBySerial() 241 return testDevice; in getDeviceBySerial()
|
D | TestInvocation.java | 809 for (ITestDevice testDevice : context.getDevices()) { in logDeviceBatteryLevel() 810 if (testDevice == null) { in logDeviceBatteryLevel() 813 if (testDevice.getIDevice() instanceof StubDevice) { in logDeviceBatteryLevel() 816 if (testDevice instanceof RemoteAndroidVirtualDevice in logDeviceBatteryLevel() 817 || testDevice instanceof NestedRemoteDevice) { in logDeviceBatteryLevel() 822 Integer batteryLevel = testDevice.getBattery(); in logDeviceBatteryLevel() 824 CLog.v("Failed to get battery level for %s", testDevice.getSerialNumber()); in logDeviceBatteryLevel() 828 context.getBuildInfo(testDevice) in logDeviceBatteryLevel() 832 testDevice.getSerialNumber(), in logDeviceBatteryLevel()
|
/tools/tradefederation/core/src/com/android/tradefed/result/ |
D | JsonHttpTestResultReporter.java | 145 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()
|
D | BugreportCollector.java | 213 public BugreportCollector(ITestInvocationListener listener, ITestDevice testDevice) { in BugreportCollector() argument 217 if (testDevice == null) { in BugreportCollector() 221 mTestDevice = testDevice; in BugreportCollector()
|
/tools/tradefederation/contrib/src/com/android/aetest/tradefed/targetprep/ |
D | AeTestManagedProfileCreator.java | 155 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/targetprep/ |
D | TestAppInstallSetup.java | 538 ITestDevice testDevice, String packageName, List<File> apkFiles) in installSinglePackage() argument 546 String result = installPackage(testDevice, apkFiles); in installSinglePackage() 551 uninstallPackage(testDevice, packageName); in installSinglePackage() 552 result = installPackage(testDevice, apkFiles); in installSinglePackage() 560 packageName, apkFiles, testDevice.getSerialNumber(), result), in installSinglePackage() 561 testDevice.getDeviceDescriptor(), in installSinglePackage()
|
/tools/tradefederation/core/invocation_interfaces/com/android/tradefed/invoker/ |
D | IInvocationContext.java | 61 public void addAllocatedDevice(String deviceName, ITestDevice testDevice); in addAllocatedDevice() argument 128 public IBuildInfo getBuildInfo(ITestDevice testDevice); in getBuildInfo() argument
|
/tools/tradefederation/contrib/src/com/android/graphics/tests/ |
D | FlatlandTest.java | 112 public void setDevice(ITestDevice testDevice) { in setDevice() argument 113 mTestDevice = testDevice; in setDevice()
|
/tools/tradefederation/contrib/src/com/android/wireless/tests/ |
D | WifiStressTest.java | 208 public void setDevice(ITestDevice testDevice) { in setDevice() argument 209 mTestDevice = testDevice; in setDevice()
|
/tools/tradefederation/core/javatests/com/android/tradefed/testtype/ |
D | NativeBenchmarkTestTest.java | 114 ITestDevice testDevice, in testRun_setMaxFrequency()
|