/tools/tradefederation/core/src/com/android/tradefed/device/ |
D | DeviceManager.java | 434 private void checkAndAddAvailableDevice(final IManagedTestDevice testDevice) { in checkAndAddAvailableDevice() argument 435 if (mGlobalDeviceFilter != null && !mGlobalDeviceFilter.matches(testDevice.getIDevice())) { in checkAndAddAvailableDevice() 437 testDevice.getSerialNumber()); in checkAndAddAvailableDevice() 438 mManagedDeviceList.handleDeviceEvent(testDevice, DeviceEvent.AVAILABLE_CHECK_IGNORED); in checkAndAddAvailableDevice() 442 final String threadName = String.format("Check device %s", testDevice.getSerialNumber()); in checkAndAddAvailableDevice() 446 CLog.d("checking new '%s' '%s' responsiveness", testDevice.getClass().getName(), in checkAndAddAvailableDevice() 447 testDevice.getSerialNumber()); in checkAndAddAvailableDevice() 448 if (testDevice.getMonitor().waitForDeviceShell(CHECK_WAIT_DEVICE_AVAIL_MS)) { in checkAndAddAvailableDevice() 449 DeviceEventResponse r = mManagedDeviceList.handleDeviceEvent(testDevice, in checkAndAddAvailableDevice() 453 testDevice.getSerialNumber()); in checkAndAddAvailableDevice() [all …]
|
D | ManagedTestDeviceFactory.java | 72 IManagedTestDevice testDevice = null; in createDevice() local 74 testDevice = in createDevice() 79 testDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in createDevice() 81 testDevice = in createDevice() 86 testDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in createDevice() 89 testDevice = in createDevice() 96 testDevice = new RemoteAndroidDevice(idevice, in createDevice() 99 testDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in createDevice() 103 testDevice = in createDevice() 111 testDevice = in createDevice() [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/ |
D | GTest.java | 169 String root, ITestDevice testDevice, ITestInvocationListener listener) in doRunAllTestsInSubdirectory() argument 171 if (testDevice.isDirectory(root)) { in doRunAllTestsInSubdirectory() 176 for (String child : testDevice.getChildren(root)) { in doRunAllTestsInSubdirectory() 177 doRunAllTestsInSubdirectory(root + "/" + child, testDevice, listener); in doRunAllTestsInSubdirectory() 186 CLog.i("Running gtest %s %s on %s", root, flags, testDevice.getSerialNumber()); in doRunAllTestsInSubdirectory() 188 runTestXml(testDevice, root, flags, listener); in doRunAllTestsInSubdirectory() 190 runTest(testDevice, resultParser, root, flags); in doRunAllTestsInSubdirectory() 262 protected void executeCommandByScript(final ITestDevice testDevice, final String cmd, in executeCommandByScript() argument 265 testDevice.pushString(String.format("#!/bin/bash\n%s", cmd), tmpFileDevice); in executeCommandByScript() 267 testDevice.executeShellCommand(String.format("chmod 755 %s", tmpFileDevice)); in executeCommandByScript() [all …]
|
D | GoogleBenchmarkTest.java | 166 private void doRunAllTestsInSubdirectory(String root, ITestDevice testDevice, in doRunAllTestsInSubdirectory() argument 168 if (testDevice.isDirectory(root)) { in doRunAllTestsInSubdirectory() 170 for (String child : testDevice.getChildren(root)) { in doRunAllTestsInSubdirectory() 171 doRunAllTestsInSubdirectory(root + "/" + child, testDevice, listener); in doRunAllTestsInSubdirectory() 180 testDevice.executeShellCommand(String.format("chmod 755 %s", root)); in doRunAllTestsInSubdirectory() 186 Set<String> filteredTests = getFilteredTests(testDevice, root); in doRunAllTestsInSubdirectory() 209 executeCommand(testDevice, cmd, outputCollector); in doRunAllTestsInSubdirectory() 229 private Set<String> getFilteredTests(ITestDevice testDevice, String fullBinaryPath) in getFilteredTests() argument 231 Set<String> filteredTests = getTestsForFilters(testDevice, fullBinaryPath, mIncludeFilters); in getFilteredTests() 234 getTestsForFilters(testDevice, fullBinaryPath, mExcludeFilters)); in getFilteredTests() [all …]
|
D | NativeStressTest.java | 149 IFileEntry rootEntry, ITestDevice testDevice, ITestInvocationListener listener) in doRunAllTestsInSubdirectory() argument 155 doRunAllTestsInSubdirectory(childEntry, testDevice, listener); in doRunAllTestsInSubdirectory() 165 testDevice.executeShellCommand(String.format("chmod 755 %s", fullPath)); in doRunAllTestsInSubdirectory() 177 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() 208 testDevice.executeShellCommand(cmd, resultParser, in doRunAllTestsInSubdirectory()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/device/metric/ |
D | RuntimeRestartCollectorTest.java | 120 ITestDevice testDevice = mockTestDevice(DEVICE_SERIAL_1); in testStatsdInteractions_singleDevice() local 121 doReturn(Arrays.asList(testDevice)).when(mContext).getDevices(); in testStatsdInteractions_singleDevice() 137 eq(testDevice), in testStatsdInteractions_singleDevice() 139 verify(mCollector, times(1)).getStatsdMetadata(eq(testDevice)); in testStatsdInteractions_singleDevice() 142 verify(mCollector, times(1)).getEventMetricData(eq(testDevice), eq(CONFIG_ID_1)); in testStatsdInteractions_singleDevice() 143 verify(mCollector, times(1)).removeConfig(eq(testDevice), eq(CONFIG_ID_1)); in testStatsdInteractions_singleDevice() 144 verify(mCollector, times(2)).getStatsdMetadata(eq(testDevice)); in testStatsdInteractions_singleDevice() 197 ITestDevice testDevice = mockTestDevice(DEVICE_SERIAL_1); in testAddingMetrics_noRuntimeRestart_noPriorRuntimeRestart() local 198 doReturn(Arrays.asList(testDevice)).when(mContext).getDevices(); in testAddingMetrics_noRuntimeRestart_noPriorRuntimeRestart() 234 ITestDevice testDevice = mockTestDevice(DEVICE_SERIAL_1); in testAddingMetrics_noRuntimeRestart_withPriorRuntimeRestart() local [all …]
|
D | RebootReasonCollectorTest.java | 72 ITestDevice testDevice = mockTestDevice(DEVICE_SERIAL_1); in testStatsdInteractions_singleDevice() local 73 when(mContext.getDevices()).thenReturn(Arrays.asList(testDevice)); in testStatsdInteractions_singleDevice() 87 eq(testDevice), in testStatsdInteractions_singleDevice() 89 verify(mCollector, times(1)).getEventMetricData(eq(testDevice), eq(CONFIG_ID_1)); in testStatsdInteractions_singleDevice() 90 verify(mCollector, times(1)).removeConfig(eq(testDevice), eq(CONFIG_ID_1)); in testStatsdInteractions_singleDevice() 96 ITestDevice testDevice = mockTestDevice(DEVICE_SERIAL_1); in testAddingMetrics_singleDevice() local 97 when(mContext.getDevices()).thenReturn(Arrays.asList(testDevice)); in testAddingMetrics_singleDevice() 282 ITestDevice testDevice = mockTestDevice(DEVICE_SERIAL_1); in testCountOnlyWhenNoReboots() local 283 when(mContext.getDevices()).thenReturn(Arrays.asList(testDevice)); in testCountOnlyWhenNoReboots()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/device/ |
D | NativeDeviceTest.java | 1364 TestableAndroidNativeDevice testDevice = in testIsNewer() local 1383 assertTrue(testDevice.isNewer(localFile, remoteFile)); in testIsNewer() 1396 TestableAndroidNativeDevice testDevice = in testIsNewer_timeOffset() local 1416 assertTrue(testDevice.isNewer(localFile, remoteFile)); in testIsNewer_timeOffset() 1429 TestableAndroidNativeDevice testDevice = in testIsNewer_fails() local 1448 assertFalse(testDevice.isNewer(localFile, remoteFile)); in testIsNewer_fails() 1602 NativeDevice testDevice = new NativeDevice(mMockIDevice, in testDoReboot() local 1614 testDevice.doReboot(RebootMode.REBOOT_FULL, null); in testDoReboot() 1621 NativeDevice testDevice = new NativeDevice(mMockIDevice, in testDoReboot_skipped() local 1635 testDevice.doReboot(RebootMode.REBOOT_FULL, null); in testDoReboot_skipped() [all …]
|
D | DeviceManagerTest.java | 562 IManagedTestDevice testDevice = EasyMock.createNiceMock(IManagedTestDevice.class); in testFreeDevice_noop() local 564 EasyMock.expect(testDevice.getIDevice()).andReturn(mockIDevice); in testFreeDevice_noop() 567 replayMocks(testDevice, mockIDevice); in testFreeDevice_noop() 569 manager.freeDevice(testDevice, FreeDeviceState.AVAILABLE); in testFreeDevice_noop() 570 verifyMocks(testDevice, mockIDevice); in testFreeDevice_noop() 1001 IManagedTestDevice testDevice = new TestDevice(mMockIDevice, mMockStateMonitor, null); in testFreeDevice_unavailable() local 1010 return testDevice; in testFreeDevice_unavailable() 1062 IManagedTestDevice testDevice = new TestDevice(mMockIDevice, mMockStateMonitor, null); in testFreeDevice_recovery() local 1071 return testDevice; in testFreeDevice_recovery() 1127 IManagedTestDevice testDevice = new TestDevice(mMockIDevice, mMockStateMonitor, null); in testFreeDevice_unknown() local [all …]
|
D | TestDeviceTest.java | 451 TestDevice testDevice = new TestDevice(mMockIDevice, mMockStateMonitor, mMockDvcMonitor) { in testRecoverDevice_ThrowException() local 457 testDevice.setRecovery( in testRecoverDevice_ThrowException() 485 testDevice.setRecoveryMode(RecoveryMode.AVAILABLE); in testRecoverDevice_ThrowException() 492 testDevice.recoverDevice(); in testRecoverDevice_ThrowException()
|
/tools/tradefederation/core/test_framework/com/android/tradefed/testtype/rust/ |
D | RustBinaryTest.java | 122 String root, ITestDevice testDevice, ITestInvocationListener listener) in doRunAllTestsInSubdirectory() argument 125 if (testDevice.isDirectory(root)) { in doRunAllTestsInSubdirectory() 127 CLog.d("Look into rust directory %s on %s", root, testDevice.getSerialNumber()); in doRunAllTestsInSubdirectory() 129 for (String child : testDevice.getChildren(root)) { in doRunAllTestsInSubdirectory() 131 if (doRunAllTestsInSubdirectory(root + "/" + child, testDevice, listener)) { in doRunAllTestsInSubdirectory() 137 CLog.d("Skip rust test %s on %s", root, testDevice.getSerialNumber()); in doRunAllTestsInSubdirectory() 140 CLog.d("To run rust test %s on %s", root, testDevice.getSerialNumber()); in doRunAllTestsInSubdirectory() 141 runTest(testDevice, listener, createParser(listener, new File(root).getName()), root); in doRunAllTestsInSubdirectory() 155 final ITestDevice testDevice, in runTest() argument 177 String[] testList = testDevice.executeShellCommand(newCmd + " --list").split("\n"); in runTest() [all …]
|
/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() 199 public IBuildInfo getBuildInfo(ITestDevice testDevice) { in getBuildInfo() argument 200 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 | 576 for (ITestDevice testDevice : context.getDevices()) { in logDeviceBatteryLevel() 577 if (testDevice == null) { in logDeviceBatteryLevel() 580 if (testDevice.getIDevice() instanceof StubDevice) { in logDeviceBatteryLevel() 583 if (testDevice instanceof RemoteAndroidVirtualDevice in logDeviceBatteryLevel() 584 || testDevice instanceof NestedRemoteDevice) { in logDeviceBatteryLevel() 588 Integer batteryLevel = testDevice.getBattery(); in logDeviceBatteryLevel() 590 CLog.v("Failed to get battery level for %s", testDevice.getSerialNumber()); in logDeviceBatteryLevel() 594 context.getBuildInfo(testDevice) in logDeviceBatteryLevel() 598 testDevice.getSerialNumber(), in logDeviceBatteryLevel()
|
/tools/tradefederation/core/src/com/android/tradefed/targetprep/ |
D | TestAppInstallSetup.java | 424 ITestDevice testDevice, String packageName, List<File> apkFiles) in installSinglePackage() argument 432 String result = installPackage(testDevice, apkFiles); in installSinglePackage() 437 uninstallPackage(testDevice, packageName); in installSinglePackage() 438 result = installPackage(testDevice, apkFiles); in installSinglePackage() 446 packageName, apkFiles, testDevice.getSerialNumber(), result), in installSinglePackage() 447 testDevice.getDeviceDescriptor(), in installSinglePackage()
|
/tools/tradefederation/core/src/com/android/tradefed/result/ |
D | JsonHttpTestResultReporter.java | 143 protected void parseAdditionalDeviceDetails(ITestDevice testDevice) { in parseAdditionalDeviceDetails() argument 146 mDeviceName = testDevice.getProperty(DEVICE_NAME_PROPERTY); in parseAdditionalDeviceDetails() 151 testDevice.getProperty(SDK_VERSION_PROPERTY), in parseAdditionalDeviceDetails() 152 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/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/aetest/tradefed/targetprep/ |
D | AeTestManagedProfileCreator.java | 125 public void tearDown(ITestDevice testDevice, IBuildInfo buildInfo, Throwable throwable) in tearDown() argument 127 testDevice.removeUser(mManagedProfileUserId); in tearDown()
|
/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/tests/src/com/android/tradefed/testtype/ |
D | NativeBenchmarkTestTest.java | 111 ITestDevice testDevice, in testRun_setMaxFrequency()
|