Home
last modified time | relevance | path

Searched refs:DeviceAllocationState (Results 1 – 25 of 36) sorted by relevance

12

/tools/tradefederation/core/remote/src/com/android/tradefed/device/
DDeviceAllocationEventHandler.java24 DeviceAllocationState handleDeviceEvent(DeviceEvent event); in handleDeviceEvent()
41 public DeviceAllocationState handleDeviceEvent(DeviceEvent event) { in handleDeviceEvent()
44 return DeviceAllocationState.Allocated; in handleDeviceEvent()
46 return DeviceAllocationState.Checking_Availability; in handleDeviceEvent()
48 return DeviceAllocationState.Unavailable; in handleDeviceEvent()
50 return DeviceAllocationState.Checking_Availability; in handleDeviceEvent()
52 return DeviceAllocationState.Unavailable; in handleDeviceEvent()
54 return DeviceAllocationState.Available; in handleDeviceEvent()
56 return DeviceAllocationState.Available; in handleDeviceEvent()
58 return DeviceAllocationState.Unknown; in handleDeviceEvent()
[all …]
DDeviceAllocationState.java21 public enum DeviceAllocationState implements DeviceAllocationEventHandler { enum
37 DeviceAllocationState(DeviceAllocationEventHandler eventHandler) { in DeviceAllocationState() method in DeviceAllocationState
42 public DeviceAllocationState handleDeviceEvent(DeviceEvent event) { in handleDeviceEvent()
/tools/tradefederation/core/javatests/com/android/tradefed/cluster/
DClusterHostUtilTest.java23 import com.android.tradefed.device.DeviceAllocationState;
103 DeviceAllocationState.Available, in testGetDefaultRunTarget()
120 DeviceAllocationState.Available, in testGetDefaultRunTargetWithSameProductAndProductVariant()
137 DeviceAllocationState.Available, in testSimpleConstantRunTargetMatchPattern()
154 DeviceAllocationState.Available, in testDeviceTagRunTargetMatchPattern_simple()
173 DeviceAllocationState.Available, in testDeviceTagRunTargetMatchPattern_missingSerial()
191 DeviceAllocationState.Available, in testInvalidRunTargetMetachPattern()
216 DeviceAllocationState.Available, in testSupportedRunTargetMatchPattern()
241 DeviceAllocationState.Available, in testSupportedRunTargetMatchPattern_unknownProperty()
264 DeviceAllocationState.Available, in testSupportedRunTargetMatchPattern_productAndStub()
[all …]
DClusterCommandSchedulerTest.java44 import com.android.tradefed.device.DeviceAllocationState;
308 String product, String variant, DeviceAllocationState state) {
313 String serial, String product, String variant, DeviceAllocationState state) {
321 deviceList.add(createDevice("product1", "variant1", DeviceAllocationState.Available));
322 deviceList.add(createDevice("product2", "variant2", DeviceAllocationState.Available));
323 deviceList.add(createDevice("product2", "variant2", DeviceAllocationState.Allocated));
324 deviceList.add(createDevice("product3", "variant3", DeviceAllocationState.Available));
325 deviceList.add(createDevice("product3", "variant3", DeviceAllocationState.Allocated));
326 deviceList.add(createDevice("product3", "variant3", DeviceAllocationState.Unavailable));
343 deviceList.add(createDevice("product1", "variant1", DeviceAllocationState.Available));
[all …]
/tools/tradefederation/core/javatests/com/android/tradefed/device/
DDeviceManagerTest.java272 .thenReturn(new DeviceEventResponse(DeviceAllocationState.Allocated, true)); in testAllocateDevice()
286 .thenReturn(new DeviceEventResponse(DeviceAllocationState.Allocated, true)); in testAllocateDevice_match()
301 .thenReturn(new DeviceEventResponse(DeviceAllocationState.Available, true)); in testAllocateDevice_match_temporary()
304 .thenReturn(new DeviceEventResponse(DeviceAllocationState.Allocated, true)); in testAllocateDevice_match_temporary()
310 .thenReturn(new DeviceEventResponse(DeviceAllocationState.Unknown, true)); in testAllocateDevice_match_temporary()
335 .thenReturn(new DeviceEventResponse(DeviceAllocationState.Available, true)); in testAllocateDevice_stubEmulator()
338 .thenReturn(new DeviceEventResponse(DeviceAllocationState.Allocated, true)); in testAllocateDevice_stubEmulator()
373 .thenReturn(new DeviceEventResponse(DeviceAllocationState.Available, true)); in testFreeDevice_emulator()
376 .thenReturn(new DeviceEventResponse(DeviceAllocationState.Allocated, true)); in testFreeDevice_emulator()
383 .thenReturn(new DeviceEventResponse(DeviceAllocationState.Available, true)); in testFreeDevice_emulator()
[all …]
DMockDeviceManager.java212 DeviceAllocationState.Available, in allocateDevice()
213 DeviceAllocationState.Allocated); in allocateDevice()
225 DeviceAllocationState.Allocated, in freeDevice()
226 DeviceAllocationState.Available); in freeDevice()
359 DeviceAllocationState.Available, in getDeviceDescriptor()
/tools/tradefederation/core/javatests/com/android/tradefed/service/management/
DDeviceManagementGrpcServerTest.java27 import com.android.tradefed.device.DeviceAllocationState;
85 descriptors.add(createDescriptor("serial1", DeviceAllocationState.Available)); in testGetDevicesStatus()
86 descriptors.add(createDescriptor("serial2", DeviceAllocationState.Allocated)); in testGetDevicesStatus()
87 descriptors.add(createDescriptor("serial3", DeviceAllocationState.Unavailable)); in testGetDevicesStatus()
88 descriptors.add(createDescriptor("serial4", DeviceAllocationState.Unknown)); in testGetDevicesStatus()
117 .thenReturn(createDescriptor("serial2", DeviceAllocationState.Allocated)); in testGetDevicesStatus_filter()
134 .thenReturn(createDescriptor("serial1", DeviceAllocationState.Available)) in testReserveAndRelease_freeDevice()
135 .thenReturn(createDescriptor("serial1", DeviceAllocationState.Allocated)); in testReserveAndRelease_freeDevice()
182 .thenReturn(createDescriptor("serial1", DeviceAllocationState.Available)) in testReserveAndRelease_notFreeDevice()
183 .thenReturn(createDescriptor("serial1", DeviceAllocationState.Allocated)); in testReserveAndRelease_notFreeDevice()
[all …]
/tools/tradefederation/core/remote/src/com/android/tradefed/command/remote/
DDeviceDescriptor.java21 import com.android.tradefed.device.DeviceAllocationState;
34 private final DeviceAllocationState mState;
55 public DeviceDescriptor(String serial, boolean isStubDevice, DeviceAllocationState state, in DeviceDescriptor()
62 public DeviceDescriptor(String serial, boolean isStubDevice, DeviceAllocationState state, in DeviceDescriptor()
92 DeviceAllocationState state, in DeviceDescriptor()
130 DeviceAllocationState state, in DeviceDescriptor()
169 DeviceAllocationState state, in DeviceDescriptor()
208 public DeviceDescriptor(DeviceDescriptor d, DeviceAllocationState state) { in DeviceDescriptor()
298 public DeviceAllocationState getState() { in getState()
/tools/tradefederation/core/device_build_interfaces/com/android/tradefed/device/
DIManagedTestDevice.java31 final DeviceAllocationState allocationState;
35 DeviceEventResponse(DeviceAllocationState s, boolean b) { in DeviceEventResponse()
112 public DeviceAllocationState getAllocationState(); in getAllocationState()
/tools/tradefederation/core/javatests/com/android/tradefed/device/recovery/
DUsbResetMultiDeviceRecoveryTest.java27 import com.android.tradefed.device.DeviceAllocationState;
98 when(mDevice.getAllocationState()).thenReturn(DeviceAllocationState.Available); in testRecover_available()
111 when(mDevice.getAllocationState()).thenReturn(DeviceAllocationState.Unavailable); in testRecover_unavailable()
125 when(mDevice.getAllocationState()).thenReturn(DeviceAllocationState.Allocated); in testRecover_fastboot_allocated()
140 when(mDevice.getAllocationState()).thenReturn(DeviceAllocationState.Ignored); in testRecover_fastboot_unallocated()
165 when(mDevice.getAllocationState()).thenReturn(DeviceAllocationState.Unknown); in testRecover_notConnected()
DRunConfigDeviceRecoveryTest.java26 import com.android.tradefed.device.DeviceAllocationState;
80 when(mMockTestDevice.getAllocationState()).thenReturn(DeviceAllocationState.Allocated); in testRecoverDevice_allocated()
88 when(mMockTestDevice.getAllocationState()).thenReturn(DeviceAllocationState.Available); in testRecoverDevice_offline()
105 when(mMockTestDevice.getAllocationState()).thenReturn(DeviceAllocationState.Available); in testRecoverDevice_fastboot()
118 when(mMockTestDevice.getAllocationState()).thenReturn(DeviceAllocationState.Available); in testRecoverDevice_run()
DUsbResetRunConfigRecoveryTest.java22 import com.android.tradefed.device.DeviceAllocationState;
66 doReturn(DeviceAllocationState.Available).when(mockDevice).getAllocationState(); in testShouldSkip_available()
/tools/tradefederation/core/src/com/android/tradefed/device/recovery/
DUsbResetMultiDeviceRecovery.java24 import com.android.tradefed.device.DeviceAllocationState;
123 DeviceAllocationState state = device.getAllocationState(); in shouldReset()
124 return !DeviceAllocationState.Allocated.equals(state) in shouldReset()
125 && !DeviceAllocationState.Available.equals(state); in shouldReset()
DUsbResetRunConfigRecovery.java19 import com.android.tradefed.device.DeviceAllocationState;
40 if (!res && DeviceAllocationState.Available.equals(device.getAllocationState())) { in shouldSkip()
DRunConfigDeviceRecovery.java24 import com.android.tradefed.device.DeviceAllocationState;
69 if (DeviceAllocationState.Allocated.equals(device.getAllocationState())) { in recoverDevices()
/tools/tradefederation/core/src/com/android/tradefed/device/
DIDeviceMonitor.java60 public void notifyDeviceStateChange(String serial, DeviceAllocationState oldState, in notifyDeviceStateChange()
61 DeviceAllocationState newState); in notifyDeviceStateChange()
DDeviceMonitorMultiplexer.java58 public synchronized void notifyDeviceStateChange(String serial, DeviceAllocationState oldState, in notifyDeviceStateChange()
59 DeviceAllocationState newState) { in notifyDeviceStateChange()
DManagedDeviceList.java79 r.stateChanged && r.allocationState == DeviceAllocationState.Allocated; in matches()
306 if (d == null || DeviceAllocationState.Unavailable.equals(d.getAllocationState())) {
383 if (r != null && r.allocationState == DeviceAllocationState.Unknown) {
/tools/tradefederation/core/javatests/com/android/tradefed/targetprep/
DTargetSetupErrorTest.java22 import com.android.tradefed.device.DeviceAllocationState;
66 DeviceAllocationState.Allocated, in testSerialization_withIDevice()
DInstrumentationPreparerTest.java26 import com.android.tradefed.device.DeviceAllocationState;
119 DeviceAllocationState.Available, in testRun_testFailed()
/tools/tradefederation/core/javatests/com/android/tradefed/device/cloud/
DRemoteAndroidVirtualDeviceTest.java23 import com.android.tradefed.device.DeviceAllocationState;
78 "", false, DeviceAllocationState.Allocated, "", "", "", "", ""); in getDeviceDescriptor()
/tools/tradefederation/core/src/com/android/tradefed/service/management/
DDeviceManagementGrpcServer.java7 import com.android.tradefed.device.DeviceAllocationState;
181 if (DeviceAllocationState.Allocated.equals(descriptor.getState())) { in reserveDevice()
187 } else if (DeviceAllocationState.Unavailable.equals(descriptor.getState())) { in reserveDevice()
270 DeviceAllocationState state, String serial) { in allocationStateToReservation()
/tools/tradefederation/core/src/com/android/tradefed/cluster/
DClusterDeviceMonitor.java23 import com.android.tradefed.device.DeviceAllocationState;
227 String serial, DeviceAllocationState oldState, DeviceAllocationState newState) { in notifyDeviceStateChange()
/tools/tradefederation/core/javatests/com/android/tradefed/monitoring/
DLabResourceDeviceMonitorTest.java22 import com.android.tradefed.device.DeviceAllocationState;
65 DeviceAllocationState.Available,
/tools/tradefederation/core/src/com/android/tradefed/monitoring/
DLabResourceDeviceMonitor.java26 import com.android.tradefed.device.DeviceAllocationState;
287 String serial, DeviceAllocationState oldState, DeviceAllocationState newState) { in notifyDeviceStateChange()

12