Home
last modified time | relevance | path

Searched refs:mockDevice (Results 1 – 17 of 17) sorted by relevance

/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/suite/
DBaseTestSuiteTest.java295 ITestDevice mockDevice = EasyMock.createMock(ITestDevice.class); in testLoadTestsForMultiAbi() local
296 mRunner.setDevice(mockDevice); in testLoadTestsForMultiAbi()
300 EasyMock.replay(mockDevice); in testLoadTestsForMultiAbi()
305 EasyMock.verify(mockDevice); in testLoadTestsForMultiAbi()
314 ITestDevice mockDevice = EasyMock.createMock(ITestDevice.class); in testLoadTests_parameterizedModule() local
315 mRunner.setDevice(mockDevice); in testLoadTests_parameterizedModule()
324 EasyMock.replay(mockDevice); in testLoadTests_parameterizedModule()
331 EasyMock.verify(mockDevice); in testLoadTests_parameterizedModule()
356 ITestDevice mockDevice = EasyMock.createMock(ITestDevice.class); in testLoadTests_parameterizedModule_load_with_filter() local
357 mRunner.setDevice(mockDevice); in testLoadTests_parameterizedModule_load_with_filter()
[all …]
DTfSuiteRunnerTest.java286 ITestDevice mockDevice = EasyMock.createMock(ITestDevice.class); in testLoadTestsForMultiAbi() local
287 mRunner.setDevice(mockDevice); in testLoadTestsForMultiAbi()
291 EasyMock.replay(mockDevice); in testLoadTestsForMultiAbi()
296 EasyMock.verify(mockDevice); in testLoadTestsForMultiAbi()
DTestMappingSuiteRunnerTest.java470 ITestDevice mockDevice = EasyMock.createMock(ITestDevice.class); in testLoadTestsForMultiAbi() local
471 mRunner.setDevice(mockDevice); in testLoadTestsForMultiAbi()
472 EasyMock.replay(mockDevice); in testLoadTestsForMultiAbi()
479 EasyMock.verify(mockDevice); in testLoadTestsForMultiAbi()
/tools/tradefederation/core/tests/src/com/android/tradefed/device/
DMockDeviceManager.java66 ITestDevice mockDevice = EasyMock.createNiceMock(ITestDevice.class); in setNumDevicesInternal() local
67 EasyMock.expect(mockDevice.getSerialNumber()).andReturn("serial" + i).anyTimes(); in setNumDevicesInternal()
70 EasyMock.expect(mockDevice.getIDevice()).andReturn(mockIDevice).anyTimes(); in setNumDevicesInternal()
71 EasyMock.expect(mockDevice.getDeviceState()).andReturn( in setNumDevicesInternal()
73 EasyMock.expect(mockDevice.waitForDeviceShell(EasyMock.anyLong())) in setNumDevicesInternal()
75 EasyMock.replay(mockDevice, mockIDevice); in setNumDevicesInternal()
76 mAvailableDeviceQueue.add(mockDevice); in setNumDevicesInternal()
92 ITestDevice mockDevice = new TestDevice(mockIDevice, stateMonitor, allocationMonitor) { in setNumDevicesCustomRealNoRecovery() local
98 mockDevice.setRecoveryMode(RecoveryMode.NONE); in setNumDevicesCustomRealNoRecovery()
99 mAvailableDeviceQueue.add(mockDevice); in setNumDevicesCustomRealNoRecovery()
[all …]
DManagedDeviceListTest.java117 IManagedTestDevice mockDevice = EasyMock.createMock(IManagedTestDevice.class); in testUpdateFastbootState() local
118 EasyMock.expect(mockDevice.getSerialNumber()).andReturn("serial1"); in testUpdateFastbootState()
119 mockDevice.setDeviceState(TestDeviceState.FASTBOOT); in testUpdateFastbootState()
121 mManagedDeviceList.add(mockDevice); in testUpdateFastbootState()
123 EasyMock.replay(mockDevice); in testUpdateFastbootState()
127 EasyMock.verify(mockDevice); in testUpdateFastbootState()
137 IManagedTestDevice mockDevice = EasyMock.createMock(IManagedTestDevice.class); in testUpdateFastbootState_gone() local
138 EasyMock.expect(mockDevice.getSerialNumber()).andStubReturn("serial1"); in testUpdateFastbootState_gone()
139 EasyMock.expect(mockDevice.getDeviceState()).andReturn(TestDeviceState.FASTBOOT); in testUpdateFastbootState_gone()
140 mockDevice.setDeviceState(TestDeviceState.NOT_AVAILABLE); in testUpdateFastbootState_gone()
[all …]
DMockTestDeviceHelper.java39 static void injectShellResponse(ITestDevice mockDevice, final String expectedCommand, in injectShellResponse() argument
53 mockDevice.executeShellCommand(EasyMock.eq(expectedCommand), in injectShellResponse()
56 mockDevice.executeShellCommand(EasyMock.<String>anyObject(), in injectShellResponse()
82 static void injectShellResponse(ITestDevice mockDevice, final String expectedCommand, in injectShellResponse() argument
98 mockDevice.executeShellCommand(EasyMock.eq(expectedCommand), in injectShellResponse()
102 mockDevice.executeShellCommand(EasyMock.<String> anyObject(), in injectShellResponse()
DDeviceStateMonitorTest.java96 IDevice mockDevice = EasyMock.createMock(IDevice.class); in testIsAdbTcp_usb() local
97 EasyMock.expect(mockDevice.getSerialNumber()).andStubReturn("2345asdf"); in testIsAdbTcp_usb()
98 EasyMock.expect(mockDevice.getState()).andReturn(DeviceState.ONLINE); in testIsAdbTcp_usb()
99 EasyMock.replay(mockDevice); in testIsAdbTcp_usb()
100 DeviceStateMonitor monitor = new DeviceStateMonitor(mMockMgr, mockDevice, true); in testIsAdbTcp_usb()
108 IDevice mockDevice = EasyMock.createMock(IDevice.class); in testIsAdbTcp_tcp() local
109 EasyMock.expect(mockDevice.getSerialNumber()).andStubReturn("192.168.1.1:5555"); in testIsAdbTcp_tcp()
110 EasyMock.expect(mockDevice.getState()).andReturn(DeviceState.ONLINE); in testIsAdbTcp_tcp()
111 EasyMock.replay(mockDevice); in testIsAdbTcp_tcp()
112 DeviceStateMonitor monitor = new DeviceStateMonitor(mMockMgr, mockDevice, true); in testIsAdbTcp_tcp()
DMockFileUtil.java38 public static void setMockDirContents(ITestDevice mockDevice, String rootPath, in setMockDirContents() argument
41 EasyMock.expect(mockDevice.getFileEntry(rootPath)).andStubReturn(rootEntry); in setMockDirContents()
70 public static void setMockDirPath(ITestDevice mockDevice, String rootPath, in setMockDirPath() argument
73 EasyMock.expect(mockDevice.getFileEntry(rootPath)).andStubReturn(rootEntry); in setMockDirPath()
DMockDeviceHelper.java38 IDevice mockDevice, final String expectedCommand, final String response, boolean asStub) in injectShellResponse() argument
53 mockDevice.executeShellCommand( in injectShellResponse()
56 mockDevice.executeShellCommand( in injectShellResponse()
/tools/tradefederation/contrib/tests/src/com/android/monkey/
DMonkeyBaseTest.java62 ITestDevice mockDevice = EasyMock.createMock(ITestDevice.class); in testUptime() local
63 monkey.setDevice(mockDevice); in testUptime()
64 EasyMock.expect(mockDevice.executeShellCommand("cat /proc/uptime")) in testUptime()
66 EasyMock.replay(mockDevice); in testUptime()
73 ITestDevice mockDevice = EasyMock.createMock(ITestDevice.class); in testUptime_fail() local
74 monkey.setDevice(mockDevice); in testUptime_fail()
75 EasyMock.expect(mockDevice.getSerialNumber()).andStubReturn("serial"); in testUptime_fail()
76 EasyMock.expect(mockDevice.executeShellCommand("cat /proc/uptime")).andReturn(""); in testUptime_fail()
77 EasyMock.expect(mockDevice.executeShellCommand("cat /proc/uptime")) in testUptime_fail()
79 EasyMock.replay(mockDevice); in testUptime_fail()
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/
DGTestTest.java326 ITestDevice mockDevice = EasyMock.createMock(ITestDevice.class); in testFileExclusionRegexFilter_emptyfilters() local
327 EasyMock.expect(mockDevice.isExecutable("/test_file")).andReturn(true); in testFileExclusionRegexFilter_emptyfilters()
328 EasyMock.replay(mockDevice); in testFileExclusionRegexFilter_emptyfilters()
329 mGTest.setDevice(mockDevice); in testFileExclusionRegexFilter_emptyfilters()
331 EasyMock.verify(mockDevice); in testFileExclusionRegexFilter_emptyfilters()
345 ITestDevice mockDevice = EasyMock.createMock(ITestDevice.class); in testFileExclusionRegexFilter_skipMatched() local
346 EasyMock.expect(mockDevice.isExecutable("/some/path/file/run_me")).andReturn(true); in testFileExclusionRegexFilter_skipMatched()
347 EasyMock.expect(mockDevice.isExecutable("/some/path/file/run_me2")).andReturn(true); in testFileExclusionRegexFilter_skipMatched()
348 EasyMock.expect(mockDevice.isExecutable("/some/path/file/run_me.not")).andReturn(true); in testFileExclusionRegexFilter_skipMatched()
349 EasyMock.expect(mockDevice.isExecutable("/some/path/file/run_me.so")).andReturn(true); in testFileExclusionRegexFilter_skipMatched()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/command/
DCommandSchedulerFuncTest.java272 ITestDevice mockDevice = EasyMock.createNiceMock(ITestDevice.class); in testBatteryLowLevel() local
273 EasyMock.expect(mockDevice.getSerialNumber()).andReturn("serial").anyTimes(); in testBatteryLowLevel()
275 EasyMock.expect(mockDevice.getIDevice()).andReturn(mockIDevice).anyTimes(); in testBatteryLowLevel()
276 EasyMock.expect(mockDevice.getDeviceState()).andReturn( in testBatteryLowLevel()
285 EasyMock.replay(mockDevice); in testBatteryLowLevel()
287 mMockDeviceManager.addDevice(mockDevice); in testBatteryLowLevel()
314 ITestDevice mockDevice = EasyMock.createNiceMock(ITestDevice.class); in testBatteryLowLevel_interruptible() local
315 EasyMock.expect(mockDevice.getSerialNumber()).andReturn("serial").anyTimes(); in testBatteryLowLevel_interruptible()
317 EasyMock.expect(mockDevice.getBattery()).andReturn(10); in testBatteryLowLevel_interruptible()
318 EasyMock.expect(mockDevice.getIDevice()).andReturn(mockIDevice).anyTimes(); in testBatteryLowLevel_interruptible()
[all …]
DCommandSchedulerTest.java359 ITestDevice mockDevice = EasyMock.createMock(ITestDevice.class); in testExecCommand() local
360 EasyMock.expect(mockDevice.getSerialNumber()).andStubReturn("serial"); in testExecCommand()
361 EasyMock.expect(mockDevice.getDeviceState()).andStubReturn(TestDeviceState.ONLINE); in testExecCommand()
362 mockDevice.setRecoveryMode(EasyMock.eq(RecoveryMode.AVAILABLE)); in testExecCommand()
363 EasyMock.expect(mockDevice.getIDevice()).andStubReturn(mockIDevice); in testExecCommand()
369 EasyMock.expect(mockDevice.waitForDeviceShell(EasyMock.anyLong())).andReturn(true); in testExecCommand()
370 replayMocks(mockDevice, mockListener); in testExecCommand()
372 mScheduler.execCommand(mockListener, mockDevice, args); in testExecCommand()
1153 ITestDevice mockDevice = EasyMock.createMock(ITestDevice.class); in testExecCommand_versioning() local
1154 EasyMock.expect(mockDevice.getSerialNumber()).andStubReturn("serial"); in testExecCommand_versioning()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/device/cloud/
DGceSshTunnelMonitorTest.java153 IManagedTestDevice mockDevice = EasyMock.createMock(IManagedTestDevice.class); in testCreateSshTunnel() local
154 EasyMock.expect(mockDevice.getSerialNumber()).andReturn("INIT_SERIAL"); in testCreateSshTunnel()
155 mockDevice.setIDevice((RemoteAvdIDevice) EasyMock.anyObject()); in testCreateSshTunnel()
156 mockDevice.setFastbootEnabled(false); in testCreateSshTunnel()
158 EasyMock.replay(mockDevice); in testCreateSshTunnel()
159 mMonitor.createSshTunnel(mockDevice, mHost.getHostText(), mHost.getPortOrDefault(5555)); in testCreateSshTunnel()
160 EasyMock.verify(mockDevice); in testCreateSshTunnel()
/tools/tradefederation/core/tests/src/com/android/tradefed/util/
DSimplePerfUtilTest.java36 private ITestDevice mockDevice = null; field in SimplePerfUtilTest
41 mockDevice = EasyMock.createMock(ITestDevice.class); in setUp()
45 spu = SimplePerfUtil.newInstance(mockDevice, SimplePerfType.STAT); in testCommandStringPreparerWithoutParams()
52 spu = SimplePerfUtil.newInstance(mockDevice, SimplePerfType.RECORD); in testCommandStringPreparerWithParams()
66 spu = SimplePerfUtil.newInstance(mockDevice, SimplePerfType.LIST); in testCommandStringPreparerWithNullCommand()
/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/
DFastbootDeviceFlasherTest.java223 ITestDevice mockDevice = EasyMock.createMock(ITestDevice.class); in testFlashBaseband_noVersion() local
225 setFastbootResponseExpectations(mockDevice, "version-baseband: \n"); in testFlashBaseband_noVersion()
226 setFastbootResponseExpectations(mockDevice, "version-baseband: \n"); in testFlashBaseband_noVersion()
228 setFastbootFlashExpectations(mockDevice, "radio"); in testFlashBaseband_noVersion()
229 mockDevice.rebootIntoBootloader(); in testFlashBaseband_noVersion()
230 EasyMock.replay(mockDevice, mMockRunUtil); in testFlashBaseband_noVersion()
237 flasher.checkAndFlashBaseband(mockDevice, build); in testFlashBaseband_noVersion()
238 EasyMock.verify(mockDevice, mMockRunUtil); in testFlashBaseband_noVersion()
664 private static void setFastbootResponseExpectations(ITestDevice mockDevice, String response) in setFastbootResponseExpectations() argument
671 mockDevice.executeFastbootCommand((String)EasyMock.anyObject(), in setFastbootResponseExpectations()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/device/metric/
DHostStatsdMetricCollectorTest.java77 devices.add(mockDevice(serial)); in testMetricCollection_binaryConfig_multiDevice()
96 private ITestDevice mockDevice(String serial) { in mockDevice() method in HostStatsdMetricCollectorTest