Home
last modified time | relevance | path

Searched refs:mContext (Results 1 – 25 of 87) sorted by relevance

1234

/tools/tradefederation/core/tests/src/com/android/tradefed/testtype/suite/
DITestSuiteIntegrationTest.java105 private IInvocationContext mContext; field in ITestSuiteIntegrationTest
167 mContext = new InvocationContext(); in setUp()
168 mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in setUp()
169 mContext.addDeviceBuildInfo(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockBuildInfo); in setUp()
170 mTestInfo = TestInformation.newBuilder().setInvocationContext(mContext).build(); in setUp()
240 suite.setInvocationContext(mContext); in testSimplePassRun()
242 mListener.invocationStarted(mContext); in testSimplePassRun()
280 suite.setInvocationContext(mContext); in testSimplePassRun_withLoggedFile()
283 mainInvocationForwarder.invocationStarted(mContext); in testSimplePassRun_withLoggedFile()
336 suite.setInvocationContext(mContext); in testSimpleRun_withFail()
[all …]
DITestSuiteTest.java122 private IInvocationContext mContext; field in ITestSuiteTest
312 mContext = new InvocationContext(); in setUp()
313 mTestSuite.setInvocationContext(mContext); in setUp()
314 mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in setUp()
315 mContext.addDeviceBuildInfo(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockBuildInfo); in setUp()
316 mTestInfo = TestInformation.newBuilder().setInvocationContext(mContext).build(); in setUp()
433 mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in testRun()
460 mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in testRun_whiteListPreparer()
678 mTestSuite.setInvocationContext(mContext); in testRun_unresponsiveDevice()
737 mTestSuite.setInvocationContext(mContext); in testRun_deviceUnavailable()
[all …]
DITestSuiteMultiTest.java58 private IInvocationContext mContext; field in ITestSuiteMultiTest
141 mContext = new InvocationContext(); in testMultiDeviceITestSuite()
142 mContext.addAllocatedDevice(DEVICE_NAME_1, mMockDevice1); in testMultiDeviceITestSuite()
143 mContext.addDeviceBuildInfo(DEVICE_NAME_1, mMockBuildInfo1); in testMultiDeviceITestSuite()
144 mContext.addAllocatedDevice(DEVICE_NAME_2, mMockDevice2); in testMultiDeviceITestSuite()
145 mContext.addDeviceBuildInfo(DEVICE_NAME_2, mMockBuildInfo2); in testMultiDeviceITestSuite()
146 mTestSuite.setInvocationContext(mContext); in testMultiDeviceITestSuite()
147 mTestInfo = TestInformation.newBuilder().setInvocationContext(mContext).build(); in testMultiDeviceITestSuite()
/tools/tradefederation/core/tests/src/com/android/tradefed/invoker/
DInvocationContextTest.java48 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 …]
DInvocationExecutionTest.java78 private IInvocationContext mContext; field in InvocationExecutionTest
88 mContext = new InvocationContext(); in setUp()
113 mContext.addAllocatedDevice("default", EasyMock.createMock(ITestDevice.class)); in testCleanUp()
118 mExec.doCleanUp(mContext, mConfig, null); in testCleanUp()
132 mContext.addAllocatedDevice("default", EasyMock.createMock(ITestDevice.class)); in testCleanUp_disabled()
137 mExec.doCleanUp(mContext, mConfig, null); in testCleanUp_disabled()
151 mContext.addAllocatedDevice("default", EasyMock.createMock(ITestDevice.class)); in testCleanUp_tearDownDisabled()
156 mExec.doCleanUp(mContext, mConfig, null); in testCleanUp_tearDownDisabled()
203 TestInformation info = TestInformation.newBuilder().setInvocationContext(mContext).build(); in testRun_autoRetry()
233 TestInformation info = TestInformation.newBuilder().setInvocationContext(mContext).build(); in testRun_autoRetry_throughForwarder()
[all …]
DShardListenerTest.java44 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()
73 mShardListener.invocationStarted(mContext); in testBufferAndReplay()
85 mMockListener.invocationStarted(mContext); in testPlayRuns()
95 mShardListener.invocationStarted(mContext); in testPlayRuns()
107 mMockListener.invocationStarted(mContext); in testLogWithoutRun()
113 mShardListener.invocationStarted(mContext); in testLogWithoutRun()
[all …]
DTestInvocationMultiTest.java64 private IInvocationContext mContext; field in TestInvocationMultiTest
82 mContext = new InvocationContext(); in setUp()
156 mContext.addAllocatedDevice("device1", mDevice1); in makeTwoDeviceContext()
157 mContext.addAllocatedDevice("device2", mDevice2); in makeTwoDeviceContext()
202 mMockTestListener.invocationStarted(mContext); in testRunBuildProvider_oneMiss()
204 mMockLogSaver.invocationStarted(mContext); in testRunBuildProvider_oneMiss()
233 mContext, mMockConfig, mMockRescheduler, new ITestInvocationListener[] {}); in testRunBuildProvider_oneMiss()
261 mContext.addAllocatedDevice("device1", mDevice1); in testResolveDynamicFails()
262 mContext.addAllocatedDevice("device2", mDevice2); in testResolveDynamicFails()
298 mMockTestListener.invocationStarted(mContext); in testResolveDynamicFails()
[all …]
DSandboxedInvocationExecutionTest.java86 private IInvocationContext mContext; field in SandboxedInvocationExecutionTest
129 mContext = new InvocationContext(); in setUp()
130 mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in setUp()
131 mContext.addDeviceBuildInfo(ConfigurationDef.DEFAULT_DEVICE_NAME, new BuildInfo()); in setUp()
136 mTestInfo = TestInformation.newBuilder().setInvocationContext(mContext).build(); in setUp()
158 mInvocation.invoke(mContext, mConfig, mMockRescheduler, mMockListener); in testSandboxInvocation()
163 Mockito.verify(mMockProvider, times(1)).setInvocationContext(mContext); in testSandboxInvocation()
233 mInvocation.invoke(mContext, mConfig, mMockRescheduler, mMockListener); in testParentSandboxInvocation_sharding()
261 mInvocation.invoke(mContext, mConfig, mMockRescheduler, mMockListener); in testParentSandboxInvocation()
319 mInvocation.invoke(mContext, mConfig, mMockRescheduler, mMockListener); in testInvocation_sharding_notTests()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/device/metric/
DBaseDeviceMetricCollectorTest.java61 private IInvocationContext mContext; field in BaseDeviceMetricCollectorTest
71 mContext = new InvocationContext(); in setUp()
77 mBase.init(mContext, mMockListener); in testInitAndForwarding()
78 mBase.invocationStarted(mContext); in testInitAndForwarding()
79 mBase.testModuleStarted(mContext); in testInitAndForwarding()
126 mBase.init(mContext, mMockListener); in testMultiInit()
128 mBase.init(mContext, mMockListener); in testMultiInit()
167 mBase.init(mContext, mMockListener); in testForwarding_withException()
168 mBase.invocationStarted(mContext); in testForwarding_withException()
328 base.init(mContext, mMockListener); in verifyFiltering()
[all …]
DRuntimeRestartCollectorTest.java103 @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 …]
DRebootReasonCollectorTest.java60 @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()
169 doReturn(Arrays.asList(testDevice1, testDevice2)).when(mContext).getDevices(); in testStatsdInteractions_multiDevice()
176 mCollector.init(mContext, mListener); in testStatsdInteractions_multiDevice()
199 doReturn(Arrays.asList(testDevice1, testDevice2)).when(mContext).getDevices(); in testAddingMetrics_multiDevice()
200 doReturn(DEVICE_SERIAL_1).when(mContext).getDeviceName(testDevice1); in testAddingMetrics_multiDevice()
201 doReturn(DEVICE_SERIAL_2).when(mContext).getDeviceName(testDevice2); in testAddingMetrics_multiDevice()
[all …]
DScheduleMultipleDeviceMetricCollectorTest.java55 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 …]
DLogcatOnFailureCollectorTest.java53 private IInvocationContext mContext; field in LogcatOnFailureCollectorTest
93 mContext = new InvocationContext(); in setUp()
94 mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in setUp()
95 mContext.addAllocatedDevice("second_null_device", mNullMockDevice); in setUp()
132 mTestListener = mCollector.init(mContext, mMockListener); in testCollect()
168 mTestListener = mCollector.init(mContext, mMockListener); in testCollect_legacy()
184 mTestListener = mCollector.init(mContext, mMockListener); in testCollect_noRuns()
242 mTestListener = mCollector.init(mContext, mMockListener); in testCollect_multiRun()
/tools/tradefederation/core/tests/src/com/android/tradefed/result/suite/
DFormattedGeneratorReporterTest.java49 private IInvocationContext mContext; field in FormattedGeneratorReporterTest
55 mContext = new InvocationContext(); in setUp()
57 mContext.addDeviceBuildInfo("default", mBuildInfo); in setUp()
72 resultHolder, 0, 0, 0, 0, 500L, mContext, new HashMap<>()); in testFinalizedResults_nothingRan()
89 mReporter.invocationStarted(mContext); in testFinalizedResults_nothingRan()
106 resultHolder, 1, 1, 1, 0, 0L, mContext, new HashMap<>()); in testFinalizeResults_noAbi()
119 mReporter.invocationStarted(mContext); in testFinalizeResults_noAbi()
139 resultHolder, 1, 1, 1, 0, 0L, mContext, expectedModuleAbi); in testFinalizeResults()
152 mReporter.invocationStarted(mContext); in testFinalizeResults()
187 mReporter.invocationStarted(mContext); in testFinalizedResults_skipped()
[all …]
DXmlSuiteResultFormatterTest.java66 private IInvocationContext mContext; field in XmlSuiteResultFormatterTest
73 mContext = new InvocationContext(); in setUp()
85 mResultHolder.context = mContext; in testBasicFormat()
139 mResultHolder.context = mContext; in testFailuresReporting()
190 mResultHolder.context = mContext; in testFailuresReporting_notDone()
247 mResultHolder.context = mContext; in testAssumptionFailures_Ignore_Reporting()
308 mResultHolder.context = mContext; in testLogReporting()
359 mResultHolder.context = mContext; in testMetricReporting()
417 mResultHolder.context = mContext; in testDeviceSerials()
446 mResultHolder.context = mContext; in testBasicFormat_shallow()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/invoker/sandbox/
DParentSandboxInvocationExecutionTest.java70 private IInvocationContext mContext; field in ParentSandboxInvocationExecutionTest
112 mContext = new InvocationContext(); in setUp()
113 mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in setUp()
114 mContext.addDeviceBuildInfo(ConfigurationDef.DEFAULT_DEVICE_NAME, new BuildInfo()); in setUp()
115 mTestInfo = TestInformation.newBuilder().setInvocationContext(mContext).build(); in setUp()
124 mParentSandbox.doCleanUp(mContext, mConfig, null); in testDefaultSkipSetup_tearDown()
144 mParentSandbox.doCleanUp(mContext, mConfig, null); in testParentConfig()
168 mParentSandbox.doCleanUp(mContext, mConfig, null); in testParentConfig_errorStage()
211 TestInformation.newBuilder().setInvocationContext(mContext).build(); in testParentSandbox_testMode()
225 mContext = new InvocationContext(); in testParentSandbox_NotTestMode()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/result/
DFileSystemLogSaverTest.java62 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/testtype/suite/module/
DNativeBridgeModuleControllerTest.java39 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()
DMainlineTestModuleControllerTest.java44 private IInvocationContext mContext; field in MainlineTestModuleControllerTest
54 mContext = new InvocationContext(); in setUp()
55 mContext.addAllocatedDevice(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockDevice); in setUp()
56 mContext.addInvocationAttribute(ModuleDefinition.MODULE_ABI, "arm64-v8a"); in setUp()
57 mContext.addInvocationAttribute(ModuleDefinition.MODULE_NAME, "module1"); in setUp()
73 assertEquals(RunStrategy.RUN, mController.shouldRunModule(mContext)); in testModuleExistsRun()
89 assertEquals(RunStrategy.FULL_MODULE_BYPASS, mController.shouldRunModule(mContext)); in testModuleNotInstalledTestRun()
100 assertEquals(RunStrategy.RUN, mController.shouldRunModule(mContext)); in testControllerDisabled()
111 assertEquals(RunStrategy.RUN, mController.shouldRunModule(mContext)); in testControllerEnabledNoMainlineModuleSpecified()
DCarModuleControllerTest.java42 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.FULL_MODULE_BYPASS, mController.shouldRunModule(mContext)); in testStubDevice()
72 assertEquals(RunStrategy.FULL_MODULE_BYPASS, mController.shouldRunModule(mContext)); in testNotAutomotive()
82 assertEquals(RunStrategy.RUN, mController.shouldRunModule(mContext)); in testAutomotive()
DMinApiLevelModuleControllerTest.java41 private IInvocationContext mContext; field in MinApiLevelModuleControllerTest
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()
68 assertEquals(RunStrategy.FULL_MODULE_BYPASS, mController.shouldRunModule(mContext)); in testDeviceApiLevelLowerThanMinApiLevel()
83 assertEquals(RunStrategy.RUN, mController.shouldRunModule(mContext)); in testDeviceApiLevelHigherThanMinApiLevel()
98 assertEquals(RunStrategy.FULL_MODULE_BYPASS, mController.shouldRunModule(mContext)); in testDeviceApiLevelNotFound()
/tools/tradefederation/core/tests/src/com/android/tradefed/targetprep/multi/
DMergeMultiBuildTargetPreparerTest.java45 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/invocation_interfaces/com/android/tradefed/invoker/
DTestInformation.java33 private final IInvocationContext mContext; field in TestInformation
48 mContext = builder.mContext; in TestInformation()
58 mContext = moduleContext; in TestInformation()
88 return mContext; in getContext()
93 return mContext.getDevices().get(mPrimaryDeviceIndex); in getDevice()
98 return mContext.getDevices(); in getDevices()
103 return mContext.getBuildInfos().get(mPrimaryDeviceIndex); in getBuildInfo()
139 private IInvocationContext mContext; field in TestInformation.Builder
154 this.mContext = context; in setInvocationContext()
/tools/tradefederation/core/src/com/android/tradefed/device/metric/
DBaseDeviceMetricCollector.java77 private IInvocationContext mContext; field in BaseDeviceMetricCollector
96 mContext = context; in init()
108 return mContext.getDevices(); in getDevices()
115 mContext.getDevices() in getRealDevices()
146 return mContext.getBuildInfos(); in getBuildInfos()
246 mRunData = new DeviceMetricData(mContext); in testRunStarted()
292 mTestData = new DeviceMetricData(mContext); in testStarted()
475 if (mContext.getAttributes().get(ModuleDefinition.MODULE_NAME) != null) { in resolveRelativeFilePath()
476 mModuleName = mContext.getAttributes().get(ModuleDefinition.MODULE_NAME) in resolveRelativeFilePath()
DDeviceMetricData.java40 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()

1234