/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/test_framework/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()
|
D | CompanionAwarePreparer.java | 20 import com.android.tradefed.device.ITestDevice; 40 protected ITestDevice getCompanion(ITestDevice primary) throws TargetSetupError { in getCompanion() 41 ITestDevice companionDevice = getCompanionDeviceTracker().getCompanionDevice(primary); in getCompanion()
|
D | CompanionTestAppInstallSetup.java | 22 import com.android.tradefed.device.ITestDevice; 38 public ITestDevice getDevice() throws TargetSetupError { in getDevice() 39 ITestDevice device = super.getDevice(); in getDevice() 40 ITestDevice companion = CompanionDeviceTracker.getInstance().getCompanionDevice(device); in getDevice()
|
/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/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/invocation_interfaces/com/android/tradefed/invoker/ |
D | IInvocationContext.java | 20 import com.android.tradefed.device.ITestDevice; 21 import com.android.tradefed.device.ITestDevice.RecoveryMode; 61 public void addAllocatedDevice(String deviceName, ITestDevice testDevice); in addAllocatedDevice() 69 public void addAllocatedDevice(Map<String, ITestDevice> deviceWithName); in addAllocatedDevice() 74 public Map<ITestDevice, IBuildInfo> getDeviceBuildMap(); in getDeviceBuildMap() 79 public List<ITestDevice> getDevices(); in getDevices() 99 public ITestDevice getDevice(String deviceName); in getDevice() 105 public ITestDevice getDeviceBySerial(String serial); in getDeviceBySerial() 111 public String getDeviceName(ITestDevice device); in getDeviceName() 128 public IBuildInfo getBuildInfo(ITestDevice testDevice); in getBuildInfo()
|
/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 …]
|
D | CircularAtraceUtil.java | 19 import com.android.tradefed.device.ITestDevice; 46 …private static HashMap<ITestDevice, Integer> deviceBufferMap = new HashMap<ITestDevice, Integer>(); 54 public static void startTrace(ITestDevice device, List<String> tags, int bufferSizeMB) throws in startTrace() 81 …public static FileInputStreamSource endTrace(ITestDevice device) throws DeviceNotAvailableExceptio… in endTrace()
|
/tools/tradefederation/core/test_framework/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/tests/src/com/android/tradefed/suite/checker/ |
D | UserCheckerTest.java | 26 import com.android.tradefed.device.ITestDevice; 51 ITestDevice preDevice = in testNoWarningsIsSuccess() 55 ITestDevice postDevice = in testNoWarningsIsSuccess() 65 ITestDevice preDevice = in testSwitchIsSuccess() 77 ITestDevice postDevice = in testSwitchIsSuccess() 93 ITestDevice preDevice = in testCreateIsSuccess() 106 ITestDevice postDevice = in testCreateIsSuccess() 123 ITestDevice preDevice = in testCreateCleanup() 136 ITestDevice postDevice = in testCreateCleanup() 155 ITestDevice preDevice = in testCreateCleanup_cleanupFail() [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() 167 ITestDevice testDevice1 = mockTestDevice(DEVICE_SERIAL_1); in testStatsdInteractions_multiDevice() 168 ITestDevice testDevice2 = mockTestDevice(DEVICE_SERIAL_2); in testStatsdInteractions_multiDevice() [all …]
|
D | HostStatsdMetricCollectorTest.java | 32 import com.android.tradefed.device.ITestDevice; 68 private List<ITestDevice> mDevices = 82 .pushBinaryStatsConfig(any(ITestDevice.class), any(File.class)); in setUp() 100 for (ITestDevice device : mDevices) { in testCollect_perTest() 124 for (ITestDevice device : mDevices) { in testCollect_testFail() 143 for (ITestDevice device : mDevices) { in testCollect_perRun() 151 private ITestDevice mockDevice(String serial) { in mockDevice() 152 ITestDevice device = mock(ITestDevice.class); in mockDevice() 159 private Map<ITestDevice, Integer> reportsPerDevice = new HashMap<>(); 161 int numberOfReportsProcessed(ITestDevice device) { in numberOfReportsProcessed() [all …]
|
D | DeviceMetricDataTest.java | 23 import com.android.tradefed.device.ITestDevice; 41 private ITestDevice mDevice1; 46 mDevice1 = mock(ITestDevice.class); in setUp() 88 mContext.addAllocatedDevice("device2", mock(ITestDevice.class)); in testMultiDeviceAdd() 107 ITestDevice device2 = mock(ITestDevice.class); in testMultiDeviceAdd_forDevice()
|
/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; 51 private transient Map<ITestDevice, IBuildInfo> mAllocatedDeviceAndBuildMap; 53 private transient Map<String, ITestDevice> mNameAndDeviceMap; 76 mAllocatedDeviceAndBuildMap = new LinkedHashMap<ITestDevice, IBuildInfo>(); in InvocationContext() 78 mNameAndDeviceMap = new LinkedHashMap<String, ITestDevice>(); in InvocationContext() 101 public void addAllocatedDevice(String devicename, ITestDevice testDevice) { in addAllocatedDevice() 113 public void addAllocatedDevice(Map<String, ITestDevice> deviceWithName) { in addAllocatedDevice() 116 for (Entry<String, ITestDevice> entry : deviceWithName.entrySet()) { in addAllocatedDevice() 128 public Map<ITestDevice, IBuildInfo> getDeviceBuildMap() { in getDeviceBuildMap() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/util/executor/ |
D | ParallelDeviceExecutorTest.java | 23 import com.android.tradefed.device.ITestDevice; 41 private List<ITestDevice> mDevices; 42 private ITestDevice mDevice1; 43 private ITestDevice mDevice2; 48 mDevice1 = Mockito.mock(ITestDevice.class); in setUp() 49 mDevice2 = Mockito.mock(ITestDevice.class); in setUp() 58 for (ITestDevice device : mDevices) { in testSimpleExecution() 78 for (ITestDevice device : mDevices) { in testExecution_errors()
|
/tools/tradefederation/core/src/com/android/tradefed/targetprep/multi/ |
D | HelloWorldMultiTargetPreparer.java | 20 import com.android.tradefed.device.ITestDevice; 34 Map<ITestDevice, IBuildInfo> deviceBuildInfo = testInfo.getContext().getDeviceBuildMap(); in setUp() 36 ITestDevice device = testInfo.getContext().getDevices().get(0); in setUp() 42 for (Entry<ITestDevice, IBuildInfo> entry : deviceBuildInfo.entrySet()) { in setUp() 53 Map<ITestDevice, IBuildInfo> deviceBuildInfo = testInfo.getContext().getDeviceBuildMap(); in tearDown() 54 for (Entry<ITestDevice, IBuildInfo> entry : deviceBuildInfo.entrySet()) { in tearDown()
|
/tools/tradefederation/core/src/com/android/tradefed/targetprep/ |
D | FastbootDeviceFlasher.java | 23 import com.android.tradefed.device.ITestDevice; 142 public void flash(ITestDevice device, IDeviceBuildInfo deviceBuild) throws TargetSetupError, in flash() 192 protected void preFlashSetup(ITestDevice device, IDeviceBuildInfo deviceBuild) in preFlashSetup() 203 protected void handleUserDataFlashing(ITestDevice device, IDeviceBuildInfo deviceBuild) in handleUserDataFlashing() 222 protected void flashPartition(ITestDevice device, File imgFile, String partition) in flashPartition() 237 protected void wipePartition(ITestDevice device, String partition) in wipePartition() 251 protected boolean hasPartition(ITestDevice device, String partition) in hasPartition() 273 protected void downloadFlashingResources(ITestDevice device, IDeviceBuildInfo localBuild) in downloadFlashingResources() 324 ITestDevice device, IFlashingResourcesParser resourceParser, String deviceProductType) in verifyRequiredBoards() 386 protected boolean checkAndFlashBootloader(ITestDevice device, IDeviceBuildInfo deviceBuild) in checkAndFlashBootloader() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/suite/ |
D | BaseTestSuiteTest.java | 33 import com.android.tradefed.device.ITestDevice; 66 private ITestDevice mMockDevice; 73 mMockDevice = EasyMock.createMock(ITestDevice.class); in setUp() 95 public Set<IAbi> getAbis(ITestDevice device) throws DeviceNotAvailableException { in getAbis() 396 ITestDevice mockDevice = EasyMock.createMock(ITestDevice.class); in testLoadTestsForMultiAbi() 415 ITestDevice mockDevice = EasyMock.createMock(ITestDevice.class); in testLoadTests_parameterizedModule() 457 ITestDevice mockDevice = EasyMock.createMock(ITestDevice.class); in testLoadTests_parameterizedModule_load_with_filter() 483 ITestDevice mockDevice = EasyMock.createMock(ITestDevice.class); in testLoadTests_parameterizedModule_load_with_filter_param() 512 ITestDevice mockDevice = EasyMock.createMock(ITestDevice.class); in testLoadTests_forcedModule_load_with_filter_param() 537 ITestDevice mockDevice = EasyMock.createMock(ITestDevice.class); in testLoadTests_parameterizedModule_multiAbi() [all …]
|
/tools/tradefederation/core/src/com/android/tradefed/device/metric/ |
D | LogcatOnFailureCollector.java | 22 import com.android.tradefed.device.ITestDevice; 51 private Map<ITestDevice, ILogcatReceiver> mLogcatReceivers = new HashMap<>(); 52 private Map<ITestDevice, Integer> mOffset = new HashMap<>(); 56 for (ITestDevice device : getRealDevices()) { in onTestRunStart() 89 ILogcatReceiver createLogcatReceiver(ITestDevice device) { in createLogcatReceiver() 101 for (ITestDevice device : getRealDevices()) { in collectAndLog() 128 private void initReceiver(ITestDevice device) { in initReceiver() 145 private int getApiLevelNoThrow(ITestDevice device) { in getApiLevelNoThrow() 160 private boolean shouldCollect(ITestDevice device) { in shouldCollect()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/invoker/ |
D | ShardMainResultForwarderTest.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/testtype/ |
D | IDeviceTest.java | 18 import com.android.tradefed.device.ITestDevice; 30 public void setDevice(ITestDevice device); in setDevice() 37 public ITestDevice getDevice(); in getDevice()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/util/ |
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/test_framework/com/android/tradefed/targetprep/ |
D | RestartSystemServerTargetPreparer.java | 22 import com.android.tradefed.device.ITestDevice; 36 private void restartSystemServer(ITestDevice device) throws DeviceNotAvailableException { in restartSystemServer() 44 public void setUp(ITestDevice device, IBuildInfo buildInfo) in setUp() 53 public void tearDown(ITestDevice device, IBuildInfo buildInfo, Throwable e) in tearDown()
|