Home
last modified time | relevance | path

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

123

/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 …]
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 …]
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/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 …]
DMultiDeviceStubTest.java32 private IInvocationContext mContext; field in MultiDeviceStubTest
37 mContext = invocationContext; in setInvocationContext()
47 } else if (mContext.getDeviceConfigNames().size() != mExpectedDevice) { in run()
51 mContext.getDeviceConfigNames().size(), mExpectedDevice)); in run()
/tools/tradefederation/core/src/com/android/tradefed/device/metric/
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()
/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()
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()
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()
DDeviceFeatureModuleControllerTest.java42 private IInvocationContext mContext; field in DeviceFeatureModuleControllerTest
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()
66 assertEquals(RunStrategy.RUN, mController.shouldRunModule(mContext)); in testDeviceHasRequiredFeature()
79 assertEquals(RunStrategy.FULL_MODULE_BYPASS, mController.shouldRunModule(mContext)); in testDeviceHasNoRequiredFeature()
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/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 …]
/tools/tradefederation/core/tests/src/com/android/tradefed/sandbox/
DSandboxInvocationRunnerTest.java42 private IInvocationContext mContext; field in SandboxInvocationRunnerTest
48 mContext = new InvocationContext(); in setUp()
56 TestInformation info = TestInformation.newBuilder().setInvocationContext(mContext).build(); in testPrepareAndRun()
58 EasyMock.expect(mMockSandbox.prepareEnvironment(mContext, mConfig, mMockListener)) in testPrepareAndRun()
71 TestInformation info = TestInformation.newBuilder().setInvocationContext(mContext).build(); in testPrepareAndRun_prepFailure()
73 EasyMock.expect(mMockSandbox.prepareEnvironment(mContext, mConfig, mMockListener)) in testPrepareAndRun_prepFailure()
/tools/tradefederation/core/tests/src/com/android/tradefed/device/metric/
DDeviceMetricDataTest.java40 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()
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 …]
DTemperatureCollectorTest.java45 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()
DProcessMaxMemoryCollectorTest.java44 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()
DScheduledDeviceMetricCollectorTest.java61 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()
/tools/tradefederation/core/src/com/android/tradefed/testtype/suite/module/
DBaseModuleController.java49 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/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/testtype/suite/params/
DMainlineModuleHandlerTest.java46 private IInvocationContext mContext; field in MainlineModuleHandlerTest
53 mContext = new InvocationContext(); in setUp()
57 mContext.addDeviceBuildInfo(ConfigurationDef.DEFAULT_DEVICE_NAME, mMockBuildInfo); in setUp()
65 mHandler = new MainlineModuleHandler("mod1.apk", mAbi, mContext); in testApplySetup()
80 mHandler = new MainlineModuleHandler("mod1.apk+mod2.apex", mAbi, mContext); in testApplySetup_MultipleMainlineModules()
100 mHandler = new MainlineModuleHandler("mod1.apk+mod2.apex", mAbi, mContext); in testBuildDynamicBaseLink_BranchIsNotSet()
/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 …]
DATestFileSystemLogSaverTest.java41 private InvocationContext mContext; field in ATestFileSystemLogSaverTest
47 mContext = new InvocationContext(); in setUp()
48 mContext.addDeviceBuildInfo("fakeDevice", mMockBuild); in setUp()
62 saver.invocationStarted(mContext); in testGenerateLogReportDir()

123