/tools/tradefederation/core/tests/src/com/android/tradefed/device/ |
D | MockDeviceManager.java | 20 import com.android.tradefed.device.ITestDevice.RecoveryMode; 39 ConditionPriorityBlockingQueue<ITestDevice> mAvailableDeviceQueue = 40 new ConditionPriorityBlockingQueue<ITestDevice>(); 66 ITestDevice mockDevice = EasyMock.createNiceMock(ITestDevice.class); in setNumDevicesInternal() 92 ITestDevice mockDevice = new TestDevice(mockIDevice, stateMonitor, allocationMonitor) { in setNumDevicesCustomRealNoRecovery() 108 ITestDevice mockDevice = EasyMock.createNiceMock(ITestDevice.class); in setNumDevicesCustom() 132 ITestDevice mockDevice = EasyMock.createNiceMock(ITestDevice.class); in setNumDevicesStub() 144 public void addDevice(ITestDevice mockDevice) { in addDevice() 154 private static class TestDeviceMatcher implements IMatcher<ITestDevice> { 168 public boolean matches(ITestDevice element) { in matches() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/device/metric/ |
D | RuntimeRestartCollectorTest.java | 32 import com.android.tradefed.device.ITestDevice; 120 ITestDevice testDevice = mockTestDevice(DEVICE_SERIAL_1); in testStatsdInteractions_singleDevice() 124 .pushStatsConfig(any(ITestDevice.class), any(List.class)); in testStatsdInteractions_singleDevice() 127 .getEventMetricData(any(ITestDevice.class), anyLong()); in testStatsdInteractions_singleDevice() 130 .getStatsdMetadata(any(ITestDevice.class)); in testStatsdInteractions_singleDevice() 156 ITestDevice testDevice1 = mockTestDevice(DEVICE_SERIAL_1); in testStatsdInteractions_multiDevice() 157 ITestDevice testDevice2 = mockTestDevice(DEVICE_SERIAL_2); in testStatsdInteractions_multiDevice() 163 .getEventMetricData(any(ITestDevice.class), anyLong()); in testStatsdInteractions_multiDevice() 166 .getStatsdMetadata(any(ITestDevice.class)); in testStatsdInteractions_multiDevice() 197 ITestDevice testDevice = mockTestDevice(DEVICE_SERIAL_1); in testAddingMetrics_noRuntimeRestart_noPriorRuntimeRestart() [all …]
|
D | RebootReasonCollectorTest.java | 33 import com.android.tradefed.device.ITestDevice; 66 doNothing().when(mCollector).removeConfig(any(ITestDevice.class), anyLong()); in setUp() 72 ITestDevice testDevice = mockTestDevice(DEVICE_SERIAL_1); in testStatsdInteractions_singleDevice() 76 .pushStatsConfig(any(ITestDevice.class), any(List.class)); in testStatsdInteractions_singleDevice() 79 .getEventMetricData(any(ITestDevice.class), anyLong()); in testStatsdInteractions_singleDevice() 96 ITestDevice testDevice = mockTestDevice(DEVICE_SERIAL_1); in testAddingMetrics_singleDevice() 100 .pushStatsConfig(any(ITestDevice.class), any(List.class)); in testAddingMetrics_singleDevice() 107 .getEventMetricData(any(ITestDevice.class), anyLong()); in testAddingMetrics_singleDevice() 154 ITestDevice testDevice1 = mockTestDevice(DEVICE_SERIAL_1); in testStatsdInteractions_multiDevice() 155 ITestDevice testDevice2 = mockTestDevice(DEVICE_SERIAL_2); in testStatsdInteractions_multiDevice() [all …]
|
D | HostStatsdMetricCollectorTest.java | 30 import com.android.tradefed.device.ITestDevice; 75 List<ITestDevice> devices = new ArrayList<>(); in testMetricCollection_binaryConfig_multiDevice() 82 .pushBinaryStatsConfig(any(ITestDevice.class), any(File.class)); in testMetricCollection_binaryConfig_multiDevice() 89 for (ITestDevice device : devices) { in testMetricCollection_binaryConfig_multiDevice() 96 private ITestDevice mockDevice(String serial) { in mockDevice() 97 ITestDevice device = mock(ITestDevice.class); in mockDevice()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/suite/ |
D | BaseTestSuiteTest.java | 32 import com.android.tradefed.device.ITestDevice; 57 private ITestDevice mMockDevice; 63 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp() 80 public Set<IAbi> getAbis(ITestDevice device) throws DeviceNotAvailableException { in getAbis() 295 ITestDevice mockDevice = EasyMock.createMock(ITestDevice.class); in testLoadTestsForMultiAbi() 314 ITestDevice mockDevice = EasyMock.createMock(ITestDevice.class); in testLoadTests_parameterizedModule() 356 ITestDevice mockDevice = EasyMock.createMock(ITestDevice.class); in testLoadTests_parameterizedModule_load_with_filter() 382 ITestDevice mockDevice = EasyMock.createMock(ITestDevice.class); in testLoadTests_parameterizedModule_load_with_filter_param() 411 ITestDevice mockDevice = EasyMock.createMock(ITestDevice.class); in testLoadTests_parameterizedModule_multiAbi() 436 ITestDevice mockDevice = EasyMock.createMock(ITestDevice.class); in testLoadTests_parameterizedModule_multiAbi_filter() [all …]
|
/tools/tradefederation/core/src/com/android/tradefed/invoker/ |
D | InvocationContext.java | 24 import com.android.tradefed.device.ITestDevice; 25 import com.android.tradefed.device.ITestDevice.RecoveryMode; 47 private transient Map<ITestDevice, IBuildInfo> mAllocatedDeviceAndBuildMap; 49 private transient Map<String, ITestDevice> mNameAndDeviceMap; 73 mAllocatedDeviceAndBuildMap = new LinkedHashMap<ITestDevice, IBuildInfo>(); in InvocationContext() 75 mNameAndDeviceMap = new LinkedHashMap<String, ITestDevice>(); in InvocationContext() 98 public void addAllocatedDevice(String devicename, ITestDevice testDevice) { in addAllocatedDevice() 110 public void addAllocatedDevice(Map<String, ITestDevice> deviceWithName) { in addAllocatedDevice() 113 for (Entry<String, ITestDevice> entry : deviceWithName.entrySet()) { in addAllocatedDevice() 125 public Map<ITestDevice, IBuildInfo> getDeviceBuildMap() { in getDeviceBuildMap() [all …]
|
D | IInvocationContext.java | 20 import com.android.tradefed.device.ITestDevice; 21 import com.android.tradefed.device.ITestDevice.RecoveryMode; 60 public void addAllocatedDevice(String deviceName, ITestDevice testDevice); in addAllocatedDevice() 68 public void addAllocatedDevice(Map<String, ITestDevice> deviceWithName); in addAllocatedDevice() 73 public Map<ITestDevice, IBuildInfo> getDeviceBuildMap(); in getDeviceBuildMap() 78 public List<ITestDevice> getDevices(); in getDevices() 98 public ITestDevice getDevice(String deviceName); in getDevice() 104 public ITestDevice getDeviceBySerial(String serial); in getDeviceBySerial() 110 public String getDeviceName(ITestDevice device); in getDeviceName() 127 public IBuildInfo getBuildInfo(ITestDevice testDevice); in getBuildInfo()
|
/tools/tradefederation/core/src/com/android/tradefed/targetprep/ |
D | FastbootDeviceFlasher.java | 23 import com.android.tradefed.device.ITestDevice; 140 public void flash(ITestDevice device, IDeviceBuildInfo deviceBuild) throws TargetSetupError, in flash() 185 protected void preFlashSetup(ITestDevice device, IDeviceBuildInfo deviceBuild) in preFlashSetup() 196 protected void handleUserDataFlashing(ITestDevice device, IDeviceBuildInfo deviceBuild) in handleUserDataFlashing() 215 protected void flashPartition(ITestDevice device, File imgFile, String partition) in flashPartition() 228 protected void wipePartition(ITestDevice device, String partition) in wipePartition() 242 protected boolean hasPartition(ITestDevice device, String partition) in hasPartition() 265 protected void downloadFlashingResources(ITestDevice device, IDeviceBuildInfo localBuild) in downloadFlashingResources() 311 protected void verifyRequiredBoards(ITestDevice device, IFlashingResourcesParser resourceParser, in verifyRequiredBoards() 373 protected boolean checkAndFlashBootloader(ITestDevice device, IDeviceBuildInfo deviceBuild) in checkAndFlashBootloader() [all …]
|
D | InstallApexModuleTargetPreparer.java | 24 import com.android.tradefed.device.ITestDevice; 25 import com.android.tradefed.device.ITestDevice.ApexInfo; 67 public void setUp(ITestDevice device, IBuildInfo buildInfo) in setUp() 140 public void tearDown(ITestDevice device, IBuildInfo buildInfo, Throwable e) in tearDown() 161 protected void installer(ITestDevice device, IBuildInfo buildInfo, List<String> appNames) in installer() 187 ITestDevice device, IBuildInfo buildInfo, Collection<String> moduleFilenames) in installMultiPackageContainingApex() 229 protected void installUsingBundleTool(IBuildInfo buildInfo, ITestDevice device) in installUsingBundleTool() 261 ITestDevice device, IBuildInfo buildInfo, String deviceSpecFilePath, String apksName) in installSingleModuleUsingBundletool() 296 ITestDevice device, IBuildInfo buildInfo, String deviceSpecFilePath) in installMultipleModuleUsingBundletool() 413 private void cleanUpStagedAndActiveSession(ITestDevice device) in cleanUpStagedAndActiveSession() [all …]
|
D | DeviceFlashPreparer.java | 26 import com.android.tradefed.device.ITestDevice; 27 import com.android.tradefed.device.ITestDevice.RecoveryMode; 169 public void setUp(ITestDevice device, IBuildInfo buildInfo) throws TargetSetupError, in setUp() 266 protected void checkDeviceProductType(ITestDevice device, IDeviceBuildInfo deviceBuild) in checkDeviceProductType() 275 private void checkBuild(ITestDevice device, IDeviceBuildInfo deviceBuild) in checkBuild() 307 protected abstract IDeviceFlasher createFlasher(ITestDevice device) in createFlasher() 318 private void preEncryptDevice(ITestDevice device, IDeviceFlasher flasher) in preEncryptDevice() 378 private void postEncryptDevice(ITestDevice device, IDeviceFlasher flasher) in postEncryptDevice() 418 public void tearDown(ITestDevice device, IBuildInfo buildInfo, Throwable e) in tearDown()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/util/ |
D | UserUtilTest.java | 25 import com.android.tradefed.device.ITestDevice; 44 ITestDevice device = mock(ITestDevice.class); in testSwitchToUserSystemSuccess() 55 ITestDevice device = mock(ITestDevice.class); in testSwitchToUserSystemFail() 70 ITestDevice device = mock(ITestDevice.class); in testSwitchToSecondaryUserCurrent() 80 ITestDevice device = mock(ITestDevice.class); in testSwitchToSecondaryUserExists() 93 ITestDevice device = mock(ITestDevice.class); in testSwitchToSecondaryUserWithInvalid() 107 ITestDevice device = mock(ITestDevice.class); in testSwitchToPrimaryUserNonSystem() 118 private void mockListUsers(ITestDevice device, Integer[] userIds) throws Exception { in mockListUsers()
|
D | AbiFormatterTest.java | 22 import com.android.tradefed.device.ITestDevice; 51 ITestDevice device = EasyMock.createMock(ITestDevice.class); in testGetDefaultAbi() 74 ITestDevice device = EasyMock.createMock(ITestDevice.class); in testGetSupportedAbis() 100 ITestDevice device = EasyMock.createMock(ITestDevice.class); in testGetSupportedAbis_null()
|
/tools/tradefederation/core/src/com/android/tradefed/util/ |
D | BluetoothUtils.java | 21 import com.android.tradefed.device.ITestDevice; 71 public static String runBluetoothInstrumentation(ITestDevice device, String command) in runBluetoothInstrumentation() 81 public static boolean runBluetoothInstrumentationWithRetry(ITestDevice device, String command) in runBluetoothInstrumentationWithRetry() 98 public static boolean unpairWithRetry(ITestDevice device) in unpairWithRetry() 110 public static String getBluetoothMac(ITestDevice device) throws DeviceNotAvailableException { in getBluetoothMac() 128 public static boolean enable(ITestDevice device) in enable() 140 public static boolean disable(ITestDevice device) in disable() 152 public static Set<String> getBondedDevices(ITestDevice device) in getBondedDevices() 176 private static boolean isGoldAndAbove(ITestDevice device) throws DeviceNotAvailableException { in isGoldAndAbove() 192 public static boolean enableBtsnoopLogging(ITestDevice device) in enableBtsnoopLogging() [all …]
|
/tools/tradefederation/core/src/com/android/tradefed/targetprep/companion/ |
D | CompanionDeviceTracker.java | 24 import com.android.tradefed.device.ITestDevice; 38 private Map<ITestDevice, ITestDevice> mDeviceMapping = null; 41 mDeviceMapping = new HashMap<ITestDevice, ITestDevice>(); in CompanionDeviceTracker() 61 public ITestDevice allocateCompanionDevice(ITestDevice device, DeviceSelectionOptions opt) { in allocateCompanionDevice() 62 ITestDevice companion = getDeviceManager().allocateDevice(opt, false); in allocateCompanionDevice() 80 public void freeCompanionDevice(ITestDevice device) { in freeCompanionDevice() 85 ITestDevice companion = mDeviceMapping.remove(device); in freeCompanionDevice() 101 public ITestDevice getCompanionDevice(ITestDevice device) { in getCompanionDevice()
|
/tools/tradefederation/core/src/com/android/tradefed/device/ |
D | IDeviceManager.java | 59 public ITestDevice allocateDevice(); in allocateDevice() 68 public ITestDevice allocateDevice(IDeviceSelection options); in allocateDevice() 77 public ITestDevice allocateDevice(IDeviceSelection options, boolean isTemporary); in allocateDevice() 87 public ITestDevice forceAllocateDevice(String serial); in forceAllocateDevice() 98 public void freeDevice(ITestDevice device, FreeDeviceState state); in freeDevice() 111 void launchEmulator(ITestDevice device, long bootTimeout, IRunUtil runUtil, in launchEmulator() 123 public void killEmulator(ITestDevice device) throws DeviceNotAvailableException; in killEmulator() 139 public ITestDevice connectToTcpDevice(String ipAndPort); in connectToTcpDevice() 150 public boolean disconnectFromTcpDevice(ITestDevice tcpDevice); in disconnectFromTcpDevice() 162 public ITestDevice reconnectDeviceToTcp(ITestDevice usbDevice) in reconnectDeviceToTcp()
|
/tools/tradefederation/core/src/com/android/tradefed/command/remote/ |
D | DeviceTracker.java | 18 import com.android.tradefed.device.ITestDevice; 49 private Map<String, ITestDevice> mAllocatedDeviceMap = new Hashtable<String, ITestDevice>(); 58 public void allocateDevice(ITestDevice d) { in allocateDevice() 68 public ITestDevice freeDevice(String serial) { in freeDevice() 78 public Collection<ITestDevice> freeAll() { in freeAll() 79 Collection<ITestDevice> devices = new ArrayList<ITestDevice>(mAllocatedDeviceMap.values()); in freeAll() 91 public ITestDevice getDeviceForSerial(String serial) { in getDeviceForSerial()
|
/tools/tradefederation/core/src/com/android/tradefed/testtype/junit4/ |
D | BaseHostJUnit4Test.java | 27 import com.android.tradefed.device.ITestDevice; 69 private ITestDevice mDevice; 73 private Map<SuiteApkInstaller, ITestDevice> mInstallers = new LinkedHashMap<>(); 77 public final void setDevice(ITestDevice device) { in setDevice() 82 public final ITestDevice getDevice() { in getDevice() 114 public final List<ITestDevice> getListDevices() { in getListDevices() 126 ITestDevice device = mInstallers.get(installer); in autoTearDown() 152 public final void installPackage(ITestDevice device, String apkFileName, String... options) in installPackage() 191 ITestDevice device, in installPackageAsUser() 332 ITestDevice device, String pkgName, String testClassName, String testMethodName) in runDeviceTests() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/suite/checker/ |
D | UserCheckerTest.java | 28 import com.android.tradefed.device.ITestDevice; 47 ITestDevice preDevice = in testNoWarningsIsSuccess() 54 ITestDevice postDevice = in testNoWarningsIsSuccess() 67 ITestDevice preDevice = in testAllErrorsIsFailed() 75 ITestDevice postDevice = in testAllErrorsIsFailed() 88 ITestDevice device = in testSwitchToExistingOrCreateUserType() 112 ITestDevice device = in testSwitchToSecondaryUserCreateNewFail() 214 ITestDevice device = mockDeviceUserState(userIds, runningUsers, currentUser); in getMockedUserState() 219 private ITestDevice mockDeviceUserState( in mockDeviceUserState() 222 ITestDevice device = mock(ITestDevice.class); in mockDeviceUserState() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/command/remote/ |
D | RemoteManagerFuncTest.java | 25 import com.android.tradefed.device.ITestDevice; 75 ITestDevice device = EasyMock.createMock(ITestDevice.class); in testAllocateFree() 134 ITestDevice device = EasyMock.createMock(ITestDevice.class); in testAllocateClose() 158 ITestDevice device = EasyMock.createMock(ITestDevice.class); in testAllocateFreeAll() 252 ITestDevice device = EasyMock.createMock(ITestDevice.class); in testExecCommand() 278 final ITestDevice device = EasyMock.createMock(ITestDevice.class); in testConsecutiveExecCommand() 295 Map<ITestDevice, FreeDeviceState> state = new HashMap<>(); in testConsecutiveExecCommand() 409 ITestDevice device = EasyMock.createMock(ITestDevice.class); in testGetLastCommandResult_noActiveCommand() 434 ITestDevice device = EasyMock.createMock(ITestDevice.class); in testGetLastCommandResult_executing() 465 final ITestDevice device = EasyMock.createMock(ITestDevice.class); in testGetLastCommandResult_notAvail() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/invoker/ |
D | ShardMasterResultForwarderTest.java | 24 import com.android.tradefed.device.ITestDevice; 68 main.addAllocatedDevice("device1", Mockito.mock(ITestDevice.class)); in testForwardBuildInfo() 74 shard1.addAllocatedDevice("device1", Mockito.mock(ITestDevice.class)); in testForwardBuildInfo() 80 shard2.addAllocatedDevice("device1", Mockito.mock(ITestDevice.class)); in testForwardBuildInfo() 102 main.addAllocatedDevice("device1", Mockito.mock(ITestDevice.class)); in testForwardBuildInfo_multiDevice() 107 main.addAllocatedDevice("device2", Mockito.mock(ITestDevice.class)); in testForwardBuildInfo_multiDevice() 113 shard1.addAllocatedDevice("device1", Mockito.mock(ITestDevice.class)); in testForwardBuildInfo_multiDevice() 118 shard1.addAllocatedDevice("device2", Mockito.mock(ITestDevice.class)); in testForwardBuildInfo_multiDevice() 124 shard2.addAllocatedDevice("device1", Mockito.mock(ITestDevice.class)); in testForwardBuildInfo_multiDevice() 129 shard2.addAllocatedDevice("device2", Mockito.mock(ITestDevice.class)); in testForwardBuildInfo_multiDevice() [all …]
|
/tools/tradefederation/core/src/com/android/tradefed/device/metric/ |
D | LogcatOnFailureCollector.java | 20 import com.android.tradefed.device.ITestDevice; 41 private Map<ITestDevice, ILogcatReceiver> mLogcatReceivers = new HashMap<>(); 42 private Map<ITestDevice, Integer> mOffset = new HashMap<>(); 46 for (ITestDevice device : getDevices()) { in onTestRunStart() 65 for (ITestDevice device : getDevices()) { in onTestFail() 84 ILogcatReceiver createLogcatReceiver(ITestDevice device) { in createLogcatReceiver() 93 private void initReceiver(ITestDevice device) { in initReceiver()
|
D | HostStatsdMetricCollector.java | 21 import com.android.tradefed.device.ITestDevice; 52 for (ITestDevice device : getDevices()) { in onTestRunStart() 69 for (ITestDevice device : getDevices()) { in onTestRunEnd() 92 InputStreamSource getReportByteStream(ITestDevice device, long configId) in getReportByteStream() 98 long pushBinaryStatsConfig(ITestDevice device, File configFile) in pushBinaryStatsConfig() 104 void removeConfig(ITestDevice device, long configId) throws DeviceNotAvailableException { in removeConfig() 117 ITestDevice device, InputStreamSource dataStream, DeviceMetricData runData) {} in processStatsReport()
|
D | RebootReasonCollector.java | 25 import com.android.tradefed.device.ITestDevice; 47 private List<ITestDevice> mTestDevices; 55 for (ITestDevice device : mTestDevices) { in onTestRunStart() 73 for (ITestDevice device : mTestDevices) { in onTestRunEnd() 127 long pushStatsConfig(ITestDevice device, List<Integer> eventAtomIds) in pushStatsConfig() 133 void removeConfig(ITestDevice device, long configId) throws DeviceNotAvailableException { in removeConfig() 138 List<EventMetricData> getEventMetricData(ITestDevice device, long configId) in getEventMetricData()
|
/tools/tradefederation/core/src/com/android/tradefed/util/clockwork/ |
D | ClockworkUtils.java | 21 import com.android.tradefed.device.ITestDevice; 35 public ITestDevice setUpMultiDevice( in setUpMultiDevice() 36 Map<ITestDevice, IBuildInfo> deviceInfos, List<ITestDevice> deviceList) { in setUpMultiDevice() argument 37 ITestDevice companion = null; in setUpMultiDevice() 42 for (Map.Entry<ITestDevice, IBuildInfo> entry : deviceInfos.entrySet()) { in setUpMultiDevice()
|
/tools/tradefederation/core/src/com/android/tradefed/targetprep/multi/ |
D | HelloWorldMultiTargetPreparer.java | 20 import com.android.tradefed.device.ITestDevice; 36 Map<ITestDevice, IBuildInfo> deviceBuildInfo = context.getDeviceBuildMap(); in setUp() 38 ITestDevice device = context.getDevices().get(0); in setUp() 44 for (Entry<ITestDevice, IBuildInfo> entry : deviceBuildInfo.entrySet()) { in setUp() 56 Map<ITestDevice, IBuildInfo> deviceBuildInfo = context.getDeviceBuildMap(); in tearDown() 57 for (Entry<ITestDevice, IBuildInfo> entry : deviceBuildInfo.entrySet()) { in tearDown()
|