/tools/tradefederation/core/tests/src/com/android/tradefed/invoker/ |
D | InvocationContextTest.java | 48 private InvocationContext mContext; field in InvocationContextTest 52 mContext = new InvocationContext(); in setUp() 59 assertNull(mContext.getInvocationId()); in testGetInvocationID() 62 mContext.addInvocationAttribute(IInvocationContext.INVOCATION_ID, "TEST_ID"); in testGetInvocationID() 63 assertEquals("TEST_ID", mContext.getInvocationId()); in testGetInvocationID() 72 assertNull(mContext.getDeviceName(device1)); in testGetDeviceName() 73 mContext.addAllocatedDevice("test1", device1); in testGetDeviceName() 74 assertEquals("test1", mContext.getDeviceName(device1)); in testGetDeviceName() 75 assertNull(mContext.getDeviceName(device2)); in testGetDeviceName() 84 assertNull(mContext.getBuildInfoName(build1)); in testGetBuildInfoName() [all …]
|
D | InvocationExecutionTest.java | 74 private IInvocationContext mContext; field in InvocationExecutionTest 82 mContext = new InvocationContext(); in setUp() 104 mContext.addAllocatedDevice("default", EasyMock.createMock(ITestDevice.class)); in testCleanUp() 109 mExec.doCleanUp(mContext, mConfig, null); in testCleanUp() 123 mContext.addAllocatedDevice("default", EasyMock.createMock(ITestDevice.class)); in testCleanUp_disabled() 128 mExec.doCleanUp(mContext, mConfig, null); in testCleanUp_disabled() 142 mContext.addAllocatedDevice("default", EasyMock.createMock(ITestDevice.class)); in testCleanUp_tearDownDisabled() 147 mExec.doCleanUp(mContext, mConfig, null); in testCleanUp_tearDownDisabled() 211 mExec.runTests(mContext, mConfig, mMockListener); in testRun_metricCollectors() 231 mExec.runTests(mContext, mConfig, mMockListener); in testRun_metricCollectors_auto() [all …]
|
D | ShardListenerTest.java | 44 private IInvocationContext mContext; field in ShardListenerTest 55 mContext = new InvocationContext(); in setUp() 56 mContext.addDeviceBuildInfo("default", new BuildInfo()); in setUp() 57 mContext.addAllocatedDevice("default", mMockDevice); in setUp() 63 mMockListener.invocationStarted(mContext); in testBufferAndReplay() 72 mShardListener.invocationStarted(mContext); in testBufferAndReplay() 84 mMockListener.invocationStarted(mContext); in testLogWithoutRun() 90 mShardListener.invocationStarted(mContext); in testLogWithoutRun() 101 mMockListener.invocationStarted(mContext); in testBufferAndReplay_withModule() 123 mShardListener.invocationStarted(mContext); in testBufferAndReplay_withModule() [all …]
|
D | SandboxedInvocationExecutionTest.java | 77 private IInvocationContext mContext; field in SandboxedInvocationExecutionTest 117 mContext = new InvocationContext(); in setUp() 118 mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in setUp() 119 mContext.addDeviceBuildInfo(ConfigurationDef.DEFAULT_DEVICE_NAME, new BuildInfo()); in setUp() 143 mInvocation.invoke(mContext, mConfig, mMockRescheduler, mMockListener); in testSandboxInvocation() 148 Mockito.verify(mMockProvider, times(1)).setInvocationContext(mContext); in testSandboxInvocation() 217 mInvocation.invoke(mContext, mConfig, mMockRescheduler, mMockListener); in testParentSandboxInvocation_sharding() 244 mInvocation.invoke(mContext, mConfig, mMockRescheduler, mMockListener); in testParentSandboxInvocation() 302 mInvocation.invoke(mContext, mConfig, mMockRescheduler, mMockListener); in testInvocation_sharding_notTests() 304 Mockito.verify(mMockListener).invocationStarted(mContext); in testInvocation_sharding_notTests() [all …]
|
D | TestInvocationMultiTest.java | 57 private IInvocationContext mContext; field in TestInvocationMultiTest 75 mContext = new InvocationContext(); in setUp() 139 mContext.addAllocatedDevice("device1", mDevice1); in makeTwoDeviceContext() 140 mContext.addAllocatedDevice("device2", mDevice2); in makeTwoDeviceContext() 184 mMockTestListener.invocationStarted(mContext); in testRunBuildProvider_oneMiss() 186 mMockLogSaver.invocationStarted(mContext); in testRunBuildProvider_oneMiss() 209 mContext, mMockConfig, mMockRescheduler, new ITestInvocationListener[] {}); in testRunBuildProvider_oneMiss() 255 mMockTestListener.invocationStarted(mContext); in testRunBuildProvider_oneThrow() 257 mMockLogSaver.invocationStarted(mContext); in testRunBuildProvider_oneThrow() 289 mContext, mMockConfig, mMockRescheduler, new ITestInvocationListener[] {}); in testRunBuildProvider_oneThrow() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/suite/ |
D | ITestSuiteIntegrationTest.java | 101 private IInvocationContext mContext; field in ITestSuiteIntegrationTest 154 mContext = new InvocationContext(); in setUp() 155 mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in setUp() 156 mContext.addDeviceBuildInfo(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockBuildInfo); in setUp() 226 suite.setInvocationContext(mContext); in testSimplePassRun() 228 mListener.invocationStarted(mContext); in testSimplePassRun() 266 suite.setInvocationContext(mContext); in testSimplePassRun_withLoggedFile() 269 mainInvocationForwarder.invocationStarted(mContext); in testSimplePassRun_withLoggedFile() 322 suite.setInvocationContext(mContext); in testSimpleRun_withFail() 324 mListener.invocationStarted(mContext); in testSimpleRun_withFail() [all …]
|
D | ITestSuiteMultiTest.java | 57 private IInvocationContext mContext; field in ITestSuiteMultiTest 138 mContext = new InvocationContext(); in testMultiDeviceITestSuite() 139 mContext.addAllocatedDevice(DEVICE_NAME_1, mMockDevice1); in testMultiDeviceITestSuite() 140 mContext.addDeviceBuildInfo(DEVICE_NAME_1, mMockBuildInfo1); in testMultiDeviceITestSuite() 141 mContext.addAllocatedDevice(DEVICE_NAME_2, mMockDevice2); in testMultiDeviceITestSuite() 142 mContext.addDeviceBuildInfo(DEVICE_NAME_2, mMockBuildInfo2); in testMultiDeviceITestSuite() 143 mTestSuite.setInvocationContext(mContext); in testMultiDeviceITestSuite() 144 mTestSuite.setDeviceInfos(mContext.getDeviceBuildMap()); in testMultiDeviceITestSuite()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/invoker/sandbox/ |
D | ParentSandboxInvocationExecutionTest.java | 57 private IInvocationContext mContext; field in ParentSandboxInvocationExecutionTest 81 mContext = new InvocationContext(); in setUp() 82 mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in setUp() 83 mContext.addDeviceBuildInfo(ConfigurationDef.DEFAULT_DEVICE_NAME, new BuildInfo()); in setUp() 90 mParentSandbox.doSetup(mContext, mConfig, null); in testDefaultSkipSetup_tearDown() 91 mParentSandbox.doTeardown(mContext, mConfig, null, null); in testDefaultSkipSetup_tearDown() 92 mParentSandbox.doCleanUp(mContext, mConfig, null); in testDefaultSkipSetup_tearDown() 110 mParentSandbox.doSetup(mContext, mConfig, null); in testParentConfig() 111 mParentSandbox.doTeardown(mContext, mConfig, null, null); in testParentConfig() 112 mParentSandbox.doCleanUp(mContext, mConfig, null); in testParentConfig() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/suite/module/ |
D | NativeBridgeModuleControllerTest.java | 39 private IInvocationContext mContext; field in NativeBridgeModuleControllerTest 47 mContext = new InvocationContext(); in setUp() 48 mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in setUp() 49 mContext.addInvocationAttribute(ModuleDefinition.MODULE_ABI, "arm64-v8a"); in setUp() 50 mContext.addInvocationAttribute(ModuleDefinition.MODULE_NAME, "module1"); in setUp() 59 assertEquals(RunStrategy.RUN, mController.shouldRunModule(mContext)); in testStubDevice() 70 assertEquals(RunStrategy.RUN, mController.shouldRunModule(mContext)); in testNoBridgeSupport() 86 assertEquals(RunStrategy.RUN, mController.shouldRunModule(mContext)); in testBridgeSupport() 102 assertEquals(RunStrategy.RUN, mController.shouldRunModule(mContext)); in testBridgeSupport_differentBitness() 118 assertEquals(RunStrategy.FULL_MODULE_BYPASS, mController.shouldRunModule(mContext)); in testBridgeSupport_differentArch()
|
D | CarModuleControllerTest.java | 42 private IInvocationContext mContext; field in CarModuleControllerTest 50 mContext = new InvocationContext(); in setUp() 51 mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in setUp() 52 mContext.addInvocationAttribute(ModuleDefinition.MODULE_ABI, "arm64-v8a"); in setUp() 53 mContext.addInvocationAttribute(ModuleDefinition.MODULE_NAME, "module1"); in setUp() 62 assertEquals(RunStrategy.SKIP_MODULE_TESTCASES, mController.shouldRunModule(mContext)); in testStubDevice() 72 assertEquals(RunStrategy.SKIP_MODULE_TESTCASES, mController.shouldRunModule(mContext)); in testNotAutomotive() 82 assertEquals(RunStrategy.RUN, mController.shouldRunModule(mContext)); in testAutomotive()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/result/suite/ |
D | FormattedGeneratorReporterTest.java | 45 private IInvocationContext mContext; field in FormattedGeneratorReporterTest 50 mContext = new InvocationContext(); in setUp() 52 mContext.addDeviceBuildInfo("default", mBuildInfo); in setUp() 66 resultHolder, 0, 0, 0, 0, 500L, mContext, new HashMap<>()); in testFinalizedResults_nothingRan() 83 mReporter.invocationStarted(mContext); in testFinalizedResults_nothingRan() 100 resultHolder, 1, 1, 1, 0, 0L, mContext, new HashMap<>()); in testFinalizeResults_noAbi() 113 mReporter.invocationStarted(mContext); in testFinalizeResults_noAbi() 133 resultHolder, 1, 1, 1, 0, 0L, mContext, expectedModuleAbi); in testFinalizeResults() 146 mReporter.invocationStarted(mContext); in testFinalizeResults() 179 mReporter.invocationStarted(mContext); in testFinalizedResults_skipped() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/multi/ |
D | MergeMultiBuildTargetPreparerTest.java | 45 private IInvocationContext mContext; field in MergeMultiBuildTargetPreparerTest 56 mContext = new InvocationContext(); in setUp() 57 mContext.addDeviceBuildInfo("device1", mMockInfo1); in setUp() 58 mContext.addDeviceBuildInfo("device2", mMockInfo2); in setUp() 59 mContext.addAllocatedDevice("device1", mMockDevice1); in setUp() 76 mPreparer.setUp(mContext); in testMergeFiles() 100 mPreparer.setUp(mContext); in testMergeFiles_collision() 114 mPreparer.setUp(mContext); in testMergeFiles_keyNotFound() 127 mPreparer.setUp(mContext); in testReceiverNotFound() 145 mPreparer.setUp(mContext); in testProviderNotFound()
|
/tools/tradefederation/contrib/src/com/android/tradefed/ |
D | HelloWorldMultiDevices.java | 44 private IInvocationContext mContext; field in HelloWorldMultiDevices 53 mContext = invocationContext; in setInvocationContext() 68 for (ITestDevice device : mContext.getDevices()) { in run() 71 device.getSerialNumber(), mContext.getBuildInfo(device)); in run() 75 for (String deviceName : mContext.getDeviceConfigNames()) { in run() 78 mContext.getDevice(deviceName).getSerialNumber(), deviceName); in run() 82 Assert.assertNotNull(mContext.getDevice("device1")); in run() 85 mContext.getDevice("device1").getSerialNumber()); in run()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/device/metric/ |
D | ScheduleMultipleDeviceMetricCollectorTest.java | 55 private IInvocationContext mContext; field in ScheduleMultipleDeviceMetricCollectorTest 126 mContext = new InvocationContext(); in setUp() 127 mContext.addAllocatedDevice("test device", mTestDevice); in setUp() 157 DeviceMetricData runData = new DeviceMetricData(mContext); in testMultipleMetricCollector_success() 161 mMultipleMetricCollector.init(mContext, mMockListener); in testMultipleMetricCollector_success() 183 mMultipleMetricCollector.init(mContext, mMockListener); in testMultipleMetricCollector_noFailureEvenIfNoCollectorRequested() 185 DeviceMetricData runData = new DeviceMetricData(mContext); in testMultipleMetricCollector_noFailureEvenIfNoCollectorRequested() 227 mMultipleMetricCollector.init(mContext, mMockListener); in testMultipleMetricCollector_collectorNotFound() 229 DeviceMetricData runData = new DeviceMetricData(mContext); in testMultipleMetricCollector_collectorNotFound() 272 DeviceMetricData runData = new DeviceMetricData(mContext); in testMultipleMetricCollector_failsForNonNegativeInterval() [all …]
|
D | RuntimeRestartCollectorTest.java | 103 @Mock private IInvocationContext mContext; field in RuntimeRestartCollectorTest 121 doReturn(Arrays.asList(testDevice)).when(mContext).getDevices(); in testStatsdInteractions_singleDevice() 132 mCollector.init(mContext, mListener); in testStatsdInteractions_singleDevice() 158 doReturn(Arrays.asList(testDevice1, testDevice2)).when(mContext).getDevices(); in testStatsdInteractions_multiDevice() 168 mCollector.init(mContext, mListener); in testStatsdInteractions_multiDevice() 198 doReturn(Arrays.asList(testDevice)).when(mContext).getDevices(); in testAddingMetrics_noRuntimeRestart_noPriorRuntimeRestart() 210 mCollector.init(mContext, mListener); in testAddingMetrics_noRuntimeRestart_noPriorRuntimeRestart() 235 doReturn(Arrays.asList(testDevice)).when(mContext).getDevices(); in testAddingMetrics_noRuntimeRestart_withPriorRuntimeRestart() 253 mCollector.init(mContext, mListener); in testAddingMetrics_noRuntimeRestart_withPriorRuntimeRestart() 278 doReturn(Arrays.asList(testDevice)).when(mContext).getDevices(); in testAddingMetrics_withRuntimeRestart_noPriorRuntimeRestart() [all …]
|
D | RebootReasonCollectorTest.java | 60 @Mock private IInvocationContext mContext; field in RebootReasonCollectorTest 73 when(mContext.getDevices()).thenReturn(Arrays.asList(testDevice)); in testStatsdInteractions_singleDevice() 81 mCollector.init(mContext, mListener); in testStatsdInteractions_singleDevice() 97 when(mContext.getDevices()).thenReturn(Arrays.asList(testDevice)); in testAddingMetrics_singleDevice() 110 mCollector.init(mContext, mListener); in testAddingMetrics_singleDevice() 156 doReturn(Arrays.asList(testDevice1, testDevice2)).when(mContext).getDevices(); in testStatsdInteractions_multiDevice() 163 mCollector.init(mContext, mListener); in testStatsdInteractions_multiDevice() 186 doReturn(Arrays.asList(testDevice1, testDevice2)).when(mContext).getDevices(); in testAddingMetrics_multiDevice() 197 mCollector.init(mContext, mListener); in testAddingMetrics_multiDevice() 240 when(mContext.getDevices()).thenReturn(Arrays.asList(testDevice)); in testNoMetrics() [all …]
|
D | DeviceMetricDataTest.java | 40 private IInvocationContext mContext; field in DeviceMetricDataTest 45 mContext = new InvocationContext(); in setUp() 47 mContext.addAllocatedDevice("device1", mDevice1); in setUp() 48 mData = new DeviceMetricData(mContext); in setUp() 88 mContext.addAllocatedDevice("device2", mock(ITestDevice.class)); in testMultiDeviceAdd() 108 mContext.addAllocatedDevice("device2", device2); in testMultiDeviceAdd_forDevice()
|
D | BaseDeviceMetricCollectorTest.java | 53 private IInvocationContext mContext; field in BaseDeviceMetricCollectorTest 61 mContext = new InvocationContext(); in setUp() 67 mBase.init(mContext, mMockListener); in testInitAndForwarding() 68 mBase.invocationStarted(mContext); in testInitAndForwarding() 139 mBase.init(mContext, mMockListener); in testForwarding_withException() 140 mBase.invocationStarted(mContext); in testForwarding_withException() 298 base.init(mContext, mMockListener); in verifyFiltering() 299 base.invocationStarted(mContext); in verifyFiltering() 399 mBase.init(mContext, mMockListener); in testActualRunAnnotated_include() 400 mBase.invocationStarted(mContext); in testActualRunAnnotated_include() [all …]
|
D | TemperatureCollectorTest.java | 45 private IInvocationContext mContext; field in TemperatureCollectorTest 52 mContext = mock(IInvocationContext.class); in setup() 55 when(mContext.getDevices()).thenReturn(Collections.singletonList(mDevice)); in setup() 57 mCollector.init(mContext, mListener); in setup() 68 DeviceMetricData data = new DeviceMetricData(mContext); in testCollector() 89 DeviceMetricData data = new DeviceMetricData(mContext); in testCollectorNoData()
|
D | ProcessMaxMemoryCollectorTest.java | 44 private IInvocationContext mContext; field in ProcessMaxMemoryCollectorTest 65 mContext = mock(IInvocationContext.class); in setup() 67 when(mContext.getDevices()).thenReturn(Collections.singletonList(mDevice)); in setup() 69 mCollector.init(mContext, mListener); in setup() 79 DeviceMetricData data = new DeviceMetricData(mContext); in testCollector() 97 DeviceMetricData data = new DeviceMetricData(mContext); in testCollectorNoProcess()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/result/ |
D | FileSystemLogSaverTest.java | 62 private IInvocationContext mContext; field in FileSystemLogSaverTest 73 mContext = new InvocationContext(); in setUp() 74 mContext.addDeviceBuildInfo("fakeDevice", mMockBuild); in setUp() 75 mContext.setTestTag(TEST_TAG); in setUp() 88 saver.invocationStarted(mContext); in testGetFileDir() 106 newSaver.invocationStarted(mContext); in testGetFileDir() 148 saver.invocationStarted(mContext); in testGetFileDir_retention() 174 saver.invocationStarted(mContext); in testSaveLogData_uncompressed() 208 saver.invocationStarted(mContext); in testSaveLogData_compressed() 236 saver.invocationStarted(mContext); in testSaveLogDataRaw() [all …]
|
/tools/tradefederation/core/src/com/android/tradefed/device/metric/ |
D | DeviceMetricData.java | 40 private final IInvocationContext mContext; field in DeviceMetricData 44 mContext = context; in DeviceMetricData() 56 if (mContext.getDevices().size() > 1) { in addMetric() 58 String deviceName = mContext.getDeviceName(mContext.getDevices().get(0)); in addMetric() 77 if (mContext.getDevices().size() > 1) { in addMetricForDevice() 79 String deviceName = mContext.getDeviceName(device); in addMetricForDevice()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/invoker/shard/ |
D | ShardHelperTest.java | 78 private IInvocationContext mContext; field in ShardHelperTest 104 mContext = new InvocationContext(); in setUp() 106 mContext.addDeviceBuildInfo(ConfigurationDef.DEFAULT_DEVICE_NAME, mBuildInfo); in setUp() 107 mContext.addAllocatedDevice( in setUp() 138 assertTrue(mHelper.shardConfig(mConfig, mContext, mRescheduler)); in testSplitWithShardCount() 164 assertTrue(mHelper.shardConfig(mConfig, mContext, mRescheduler)); in testSplit_noShardCount() 196 assertTrue(mHelper.shardConfig(mConfig, mContext, mRescheduler)); in testSplitWithShardCount_notEnoughTest() 241 assertTrue(mHelper.shardConfig(mConfig, mContext, mRescheduler)); in testCloneStatusChecker() 288 assertTrue(mHelper.shardConfig(mConfig, mContext, mRescheduler)); in testCloneMetricCollector() 362 assertTrue(mHelper.shardConfig(mConfig, mContext, mRescheduler)); in testClone_withKeystore() [all …]
|
D | StrictShardHelperTest.java | 68 private IInvocationContext mContext; field in StrictShardHelperTest 75 mContext = new InvocationContext(); in setUp() 76 mContext.addDeviceBuildInfo("default", new BuildInfo()); in setUp() 95 assertTrue(mHelper.shardConfig(mConfig, mContext, mRescheduler)); in testShardConfig_internal() 124 assertFalse(mHelper.shardConfig(mConfig, mContext, mRescheduler)); in testShardConfig_internal_shardIndex() 155 assertFalse(mHelper.shardConfig(mConfig, mContext, mRescheduler)); in testShardConfig_internal_shardIndex_notShardable_shard0() 186 assertFalse(mHelper.shardConfig(mConfig, mContext, mRescheduler)); in testShardConfig_internal_shardIndex_notShardable_shard1() 236 mContext.addAllocatedDevice("default", EasyMock.createMock(ITestDevice.class)); in testShard() 252 mHelper.shardConfig(mConfig, mContext, mRescheduler); in testShard() 317 mHelper.shardConfig(mConfig, mContext, mRescheduler); in testShardSuite() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/sandbox/ |
D | SandboxInvocationRunnerTest.java | 41 private IInvocationContext mContext; field in SandboxInvocationRunnerTest 47 mContext = new InvocationContext(); in setUp() 56 EasyMock.expect(mMockSandbox.prepareEnvironment(mContext, mConfig, mMockListener)) in testPrepareAndRun() 62 SandboxInvocationRunner.prepareAndRun(mConfig, mContext, mMockListener); in testPrepareAndRun() 70 EasyMock.expect(mMockSandbox.prepareEnvironment(mContext, mConfig, mMockListener)) in testPrepareAndRun_prepFailure() 75 SandboxInvocationRunner.prepareAndRun(mConfig, mContext, mMockListener); in testPrepareAndRun_prepFailure()
|