/tools/tradefederation/core/tests/src/com/android/tradefed/invoker/ |
D | InvocationContextTest.java | 42 private InvocationContext mContext; field in InvocationContextTest 46 mContext = new InvocationContext(); in setUp() 55 assertNull(mContext.getDeviceName(device1)); in testGetDeviceName() 56 mContext.addAllocatedDevice("test1", device1); in testGetDeviceName() 57 assertEquals("test1", mContext.getDeviceName(device1)); in testGetDeviceName() 58 assertNull(mContext.getDeviceName(device2)); in testGetDeviceName() 67 mContext.addInvocationAttribute("TEST_KEY", "TEST_VALUE"); in testGetAttributes() 68 assertEquals(Arrays.asList("TEST_VALUE"), mContext.getAttributes().get("TEST_KEY")); in testGetAttributes() 69 MultiMap<String, String> map = mContext.getAttributes(); in testGetAttributes() 72 assertEquals(Arrays.asList("TEST_VALUE"), mContext.getAttributes().get("TEST_KEY")); in testGetAttributes() [all …]
|
D | InvocationExecutionTest.java | 59 private IInvocationContext mContext; field in InvocationExecutionTest 66 mContext = new InvocationContext(); in setUp() 84 mContext.addAllocatedDevice("default", EasyMock.createMock(ITestDevice.class)); in testCleanUp() 89 mExec.doCleanUp(mContext, mConfig, null); in testCleanUp() 103 mContext.addAllocatedDevice("default", EasyMock.createMock(ITestDevice.class)); in testCleanUp_disabled() 108 mExec.doCleanUp(mContext, mConfig, null); in testCleanUp_disabled() 122 mContext.addAllocatedDevice("default", EasyMock.createMock(ITestDevice.class)); in testCleanUp_tearDownDisabled() 127 mExec.doCleanUp(mContext, mConfig, null); in testCleanUp_tearDownDisabled() 189 mExec.runTests(mContext, mConfig, mMockListener); in testRun_metricCollectors() 211 mContext.addAllocatedDevice("default", mock(ITestDevice.class)); in testDoSetup() [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() 86 mMockListener.invocationStarted(mContext); in testBufferAndReplay_withModule() 108 mShardListener.invocationStarted(mContext); in testBufferAndReplay_withModule() 139 mMockSaver.invocationStarted(mContext); in testLogOrderingForSharding() 142 mockListener.invocationStarted(mContext); in testLogOrderingForSharding() [all …]
|
D | TestInvocationMultiTest.java | 53 private IInvocationContext mContext; field in TestInvocationMultiTest 69 mContext = new InvocationContext(); in setUp() 129 mContext.addAllocatedDevice("device1", mDevice1); in makeTwoDeviceContext() 130 mContext.addAllocatedDevice("device2", mDevice2); in makeTwoDeviceContext() 178 mContext, mMockConfig, mMockRescheduler, new ITestInvocationListener[] {}); in testRunBuildProvider_oneMiss() 219 mMockTestListener.invocationStarted(mContext); in testRunBuildProvider_oneThrow() 220 mMockLogSaver.invocationStarted(mContext); in testRunBuildProvider_oneThrow() 252 mContext, mMockConfig, mMockRescheduler, new ITestInvocationListener[] {}); in testRunBuildProvider_oneThrow() 297 mMockTestListener.invocationStarted(mContext); in testRunBuildProvider_cleanUpThrow() 298 mMockLogSaver.invocationStarted(mContext); in testRunBuildProvider_cleanUpThrow() [all …]
|
/tools/tradefederation/core/prod-tests/src/com/android/tradefed/ |
D | HelloWorldMultiDevices.java | 46 private IInvocationContext mContext; field in HelloWorldMultiDevices 55 mContext = invocationContext; in setInvocationContext() 69 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/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()
|
D | MultiDeviceStubTest.java | 36 private IInvocationContext mContext; field in MultiDeviceStubTest 42 mContext = invocationContext; in setInvocationContext() 56 } else if (mContext.getDeviceConfigNames().size() != mExpectedDevice) { in run() 60 mContext.getDeviceConfigNames().size(), mExpectedDevice)); in run()
|
/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()
|
D | BaseDeviceMetricCollector.java | 64 private IInvocationContext mContext; field in BaseDeviceMetricCollector 78 mContext = context; in init() 85 return mContext.getDevices(); in getDevices() 90 return mContext.getBuildInfos(); in getBuildInfos() 145 mRunData = new DeviceMetricData(mContext); in testRunStarted() 186 mTestData = new DeviceMetricData(mContext); in testStarted()
|
/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()
|
/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/core/tests/src/com/android/tradefed/result/suite/ |
D | FormattedGeneratorReporterTest.java | 43 private IInvocationContext mContext; field in FormattedGeneratorReporterTest 48 mContext = new InvocationContext(); in setUp() 50 mContext.addDeviceBuildInfo("default", mBuildInfo); in setUp() 63 resultHolder, 0, 0, 0, 0, 500L, mContext, new HashMap<>()); in testFinalizedResults_nothingRan() 71 mReporter.invocationStarted(mContext); in testFinalizedResults_nothingRan() 88 resultHolder, 1, 1, 1, 0, 500L, mContext, new HashMap<>()); in testFinalizeResults_noAbi() 96 mReporter.invocationStarted(mContext); in testFinalizeResults_noAbi() 116 resultHolder, 1, 1, 1, 0, 500L, mContext, expectedModuleAbi); in testFinalizeResults() 124 mReporter.invocationStarted(mContext); in testFinalizeResults()
|
/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()
|
/tools/tradefederation/core/tests/src/com/android/tradefed/device/metric/ |
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 | 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()
|
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 | ScheduledDeviceMetricCollectorTest.java | 61 private IInvocationContext mContext; field in ScheduledDeviceMetricCollectorTest 67 mContext = new InvocationContext(); in setUp() 76 mContext.addAllocatedDevice(mDevicesWithNames); in testSetupAndPeriodicRunSingleDevice() 82 mBase.init(mContext, mMockListener); in testSetupAndPeriodicRunSingleDevice() 105 mContext.addAllocatedDevice(mDevicesWithNames); in testSetupAndPeriodicRunMultipleDevices() 111 mBase.init(mContext, mMockListener); in testSetupAndPeriodicRunMultipleDevices()
|
D | BugreportzMetricCollectorTest.java | 40 @Mock IInvocationContext mContext; field in BugreportzMetricCollectorTest 52 doReturn(Arrays.asList(mTestDevice)).when(mContext).getDevices(); in setup() 57 mBugreportzMetricCollector.init(mContext, mForwarder); in setup() 67 DeviceMetricData runData = new DeviceMetricData(mContext); in testCollect_success()
|
D | AtraceRunMetricCollectorTest.java | 48 private IInvocationContext mContext; field in AtraceRunMetricCollectorTest 53 mContext = new InvocationContext(); in setUp() 54 mContext.addAllocatedDevice("default", mMockDevice); in setUp() 67 mAtraceRunMetricCollector.init(mContext, mMockListener); in setUp()
|
D | DeviceMetricDataFuncTest.java | 46 private IInvocationContext mContext; field in DeviceMetricDataFuncTest 50 mContext = new InvocationContext(); in setUp() 52 mContext.addAllocatedDevice("device1", device); in setUp() 68 DeviceMetricData deviceMetricData = new DeviceMetricData(mContext); in testAddToMetricsMultiThreaded()
|
D | FilePullerLogCollectorTest.java | 48 private IInvocationContext mContext; field in FilePullerLogCollectorTest 55 mContext = new InvocationContext(); in setUp() 56 mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in setUp() 68 ITestInvocationListener listener = mCollector.init(mContext, mMockListener); in testPullAndLog() 104 ITestInvocationListener listener = mCollector.init(mContext, mMockListener); in testSkipTestCollection()
|
/tools/tradefederation/core/src/com/android/tradefed/testtype/suite/module/ |
D | BaseModuleController.java | 49 private IInvocationContext mContext; field in BaseModuleController 53 mContext = context; in shouldRunModule() 67 String abi = mContext.getAttributes().get(ModuleDefinition.MODULE_ABI).get(0); in getModuleAbi() 73 return mContext.getAttributes().get(ModuleDefinition.MODULE_NAME).get(0); in getModuleName()
|
/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/tests/src/com/android/tradefed/invoker/shard/ |
D | ShardHelperTest.java | 73 private IInvocationContext mContext; field in ShardHelperTest 93 mContext = new InvocationContext(); in setUp() 95 mContext.addDeviceBuildInfo(ConfigurationDef.DEFAULT_DEVICE_NAME, mBuildInfo); in setUp() 96 mContext.addAllocatedDevice( in setUp() 127 assertTrue(mHelper.shardConfig(mConfig, mContext, mRescheduler)); in testSplitWithShardCount() 153 assertTrue(mHelper.shardConfig(mConfig, mContext, mRescheduler)); in testSplit_noShardCount() 185 assertTrue(mHelper.shardConfig(mConfig, mContext, mRescheduler)); in testSplitWithShardCount_notEnoughTest() 230 assertTrue(mHelper.shardConfig(mConfig, mContext, mRescheduler)); in testCloneStatusChecker() 277 assertTrue(mHelper.shardConfig(mConfig, mContext, mRescheduler)); in testCloneMetricCollector() 345 assertTrue(mHelper.shardConfig(mConfig, mContext, mRescheduler)); in testClone_withKeystore() [all …]
|