Home
last modified time | relevance | path

Searched refs:context (Results 1 – 25 of 230) sorted by relevance

12345678910

/tools/test/connectivity/acts/framework/tests/
Dacts_context_test.py21 from acts import context
22 from acts.context import RootContext
23 from acts.context import TestCaseContext
24 from acts.context import TestClassContext
25 from acts.context import TestContext
26 from acts.context import _update_test_case_context
27 from acts.context import _update_test_class_context
28 from acts.context import get_context_for_event
29 from acts.context import get_current_context
44 context._contexts = [RootContext()]
[all …]
/tools/tradefederation/core/src/com/android/tradefed/invoker/
DTestInvocation.java174 private void logStartInvocation(IInvocationContext context, IConfiguration config) { in logStartInvocation() argument
185 msg.append(context.getTestTag()); in logStartInvocation()
187 for (Entry<ITestDevice, IBuildInfo> entry : context.getDeviceBuildMap().entrySet()) { in logStartInvocation()
197 mStatus = String.format("running %s on build(s) '%s'", context.getTestTag(), in logStartInvocation()
223 IInvocationContext context = testInfo.getContext(); in performInvocation() local
226 ((InvocationContext) context).lockAttributes(); in performInvocation()
228 logDeviceBatteryLevel(context, "initial"); in performInvocation()
232 invocationPath.runDevicePreInvocationSetup(context, config, listener); in performInvocation()
242 badDevice = context.getDeviceBySerial(e.getDeviceSerial()); in performInvocation()
246 context.setRecoveryModeForAllDevices(RecoveryMode.NONE); in performInvocation()
[all …]
DInvocationExecution.java187 public void cleanUpBuilds(IInvocationContext context, IConfiguration config) { in cleanUpBuilds() argument
189 for (String cleanUpDevice : context.getDeviceConfigNames()) { in cleanUpBuilds()
190 if (context.getBuildInfo(cleanUpDevice) != null) { in cleanUpBuilds()
194 .cleanUp(context.getBuildInfo(cleanUpDevice)); in cleanUpBuilds()
338 IInvocationContext context, IConfiguration config, ITestLogger logger) in runDevicePreInvocationSetup() argument
340 customizeDevicePreInvocation(config, context); in runDevicePreInvocationSetup()
341 for (String deviceName : context.getDeviceConfigNames()) { in runDevicePreInvocationSetup()
342 ITestDevice device = context.getDevice(deviceName); in runDevicePreInvocationSetup()
346 ((ITestLoggerReceiver) context.getDevice(deviceName)).setTestLogger(logger); in runDevicePreInvocationSetup()
348 device.preInvocationSetup(context.getBuildInfo(deviceName)); in runDevicePreInvocationSetup()
[all …]
/tools/test/connectivity/acts/framework/tests/metrics/
Dcore_test.py94 context = Mock()
95 publisher = MetricPublisher(context)
97 self.assertEqual(publisher.context, context)
103 context = Mock()
105 publisher = MetricPublisher(context)
114 context = Mock()
115 context.get_full_output_path.return_value = 'output/path'
122 context,
128 self.assertEqual(publisher.context, context)
137 context = Mock()
[all …]
Dlogger_test.py116 self.assertIsNone(logger.context)
120 context = Mock()
123 logger = MetricLogger(context=context, publisher=publisher)
125 self.assertEqual(logger.context, context)
131 context = Mock()
133 get_context.return_value = context
140 publisher_cls.assert_called_once_with(context)
141 self.assertEqual(logger.context, context)
/tools/test/connectivity/acts_tests/tests/google/fuchsia/wlan/
DWlanRvrTest.py19 from acts import context
200 output_path = context.get_current_context().get_base_output_path()
201 test_class_name = context.get_current_context().test_class_name
583 context.get_current_context().get_full_output_path(),
588 context.get_current_context().get_full_output_path(), graph_data)
603 context.get_current_context().get_full_output_path(),
608 context.get_current_context().get_full_output_path(), graph_data)
623 context.get_current_context().get_full_output_path(),
628 context.get_current_context().get_full_output_path(), graph_data)
643 context.get_current_context().get_full_output_path(),
[all …]
/tools/metalava/src/main/java/com/android/tools/metalava/model/text/
DTextTypeItem.kt42 override fun toErasedTypeString(context: Item?): String { in toString()
48 context = context in toString()
57 context: Item?, in toTypeString()
60 val typeString = toTypeString(type, outerAnnotations, innerAnnotations, erased, context) in toTypeString()
62 if (innerAnnotations && kotlinStyleNulls && !primitive && context != null) { in toTypeString()
63 var nullable: Boolean? = AnnotationItem.getImplicitNullness(context) in toTypeString()
66 for (annotation in context.modifiers.annotations()) { in toTypeString()
157 private fun findTypeVariableBounds(context: Item?, name: String): List<ClassItem> { in findTypeVariableBounds()
158 if (context is MethodItem) { in findTypeVariableBounds()
159 val bounds = findTypeVariableBounds(context.typeParameterList(), name) in findTypeVariableBounds()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/cluster/
DClusterCommandSchedulerTest.java620 IInvocationContext context = new InvocationContext();
624 context.addAllocatedDevice("", mockTestDevice);
626 context.addDeviceBuildInfo("", mockBuildInfo);
648 handler.invocationInitiated(context);
654 handler.invocationStarted(context);
660 context.addAllocatedDevice(DEVICE_SERIAL, mockTestDevice);
661 context.addInvocationAttribute(InvocationMetricKey.FETCH_BUILD.toString(), "100");
662 context.addInvocationAttribute(InvocationMetricKey.SETUP.toString(), "200");
663 context.addInvocationAttribute(InvocationMetricKey.DEVICE_LOST_DETECTED.toString(), "1");
666 handler.invocationComplete(context, releaseMap);
[all …]
/tools/tradefederation/core/src/com/android/tradefed/command/
DCommandScheduler.java487 IInvocationContext context, Map<ITestDevice, FreeDeviceState> devicesStates) { in releaseDevices() argument
491 for (ITestDevice device : context.getDevices()) { in releaseDevices()
504 IInvocationContext context, Map<ITestDevice, FreeDeviceState> devicesStates) { in invocationComplete() argument
508 .invocationComplete(context, devicesStates); in invocationComplete()
514 releaseDevices(context, devicesStates); in invocationComplete()
689 int invocId, long elapsedTime, final IInvocationContext context) { in logInvocationEndedEvent() argument
693 args.put(INVOC_END_EVENT_TAG_KEY, context.getTestTag()); in logInvocationEndedEvent()
696 for (String key : context.getAttributes().keySet()) { in logInvocationEndedEvent()
697 args.put(key, context.getAttributes().get(key).get(0)); in logInvocationEndedEvent()
802 IInvocationContext context, Throwable e) { in createReleaseMap() argument
[all …]
/tools/test/graphicsbenchmark/performance_tests/hostside/src/com/android/game/qualification/metric/
DLoopSummary.java37 IInvocationContext context, in parseRunMetrics() argument
42 getMetricLongValue(context, type, runIndex, "frame_count", runMetrics), in parseRunMetrics()
43 getMetricLongValue(context, type, runIndex, "duration", runMetrics), in parseRunMetrics()
44 getMetricDoubleValue(context, type, runIndex, "jank_rate", runMetrics), in parseRunMetrics()
45 getMetricLongValue(context, type, runIndex, "min_frametime", runMetrics), in parseRunMetrics()
46 getMetricLongValue(context, type, runIndex, "max_frametime", runMetrics), in parseRunMetrics()
47 getMetricDoubleValue(context, type, runIndex, "frametime", runMetrics), in parseRunMetrics()
48 getMetricLongValue(context, type, runIndex, "90th_percentile", runMetrics), in parseRunMetrics()
49 getMetricLongValue(context, type, runIndex, "95th_percentile", runMetrics), in parseRunMetrics()
50 getMetricLongValue(context, type, runIndex, "99th_percentile", runMetrics), in parseRunMetrics()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/result/proto/
DProtoResultParserTest.java71 TestRecord invocationStartRecord, IInvocationContext context) { in processStartInvocation() argument
74 context.getBuildInfos().get(0).addBuildAttribute(TEST_KEY, "build_value"); in processStartInvocation()
76 context.addInvocationAttribute(CONTEXT_TEST_KEY, "context_value"); in processStartInvocation()
183 IInvocationContext context = mMainInvocationContext; in testEvents() local
184 assertFalse(context.getBuildInfos().get(0).getBuildAttributes().containsKey(TEST_KEY)); in testEvents()
185 assertFalse(context.getAttributes().containsKey(CONTEXT_TEST_KEY)); in testEvents()
188 context.getBuildInfos().get(0).getBuildAttributes().get("early_key")); in testEvents()
189 assertEquals("context_value", context.getAttributes().get("early_context_key").get(0)); in testEvents()
191 assertFalse(context.getBuildInfos().get(0).getBuildAttributes().containsKey("after_start")); in testEvents()
196 context.getBuildInfos().get(0).getBuildAttributes().get("after_start")); in testEvents()
[all …]
DFileProtoResultReporterTest.java77 IInvocationContext context = new InvocationContext(); in testWriteResults() local
78 context.setConfigurationDescriptor(new ConfigurationDescriptor()); in testWriteResults()
79 context.addInvocationAttribute("test", "test"); in testWriteResults()
80 mReporter.invocationStarted(context); in testWriteResults()
101 IInvocationContext context = new InvocationContext(); in testWriteResults_periodic() local
102 context.setConfigurationDescriptor(new ConfigurationDescriptor()); in testWriteResults_periodic()
103 context.addInvocationAttribute("test", "test"); in testWriteResults_periodic()
104 mReporter.invocationStarted(context); in testWriteResults_periodic()
150 ProtoResultParser parser = new ProtoResultParser(mMockListener, context, true); in testWriteResults_periodic()
161 IInvocationContext context = new InvocationContext(); in createModuleContext() local
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/result/
DMetricsXMLResultReporterTest.java60 IInvocationContext context = new InvocationContext(); in testEmptyGeneration() local
61 context.addDeviceBuildInfo("fakeDevice", new BuildInfo("1", "test")); in testEmptyGeneration()
62 context.setTestTag("test"); in testEmptyGeneration()
63 mResultReporter.invocationStarted(context); in testEmptyGeneration()
77 IInvocationContext context = new InvocationContext(); in testRunMetrics() local
78 context.addDeviceBuildInfo("fakeDevice", new BuildInfo()); in testRunMetrics()
79 context.setTestTag("stub"); in testRunMetrics()
80 mResultReporter.invocationStarted(context); in testRunMetrics()
104 IInvocationContext context = new InvocationContext(); in testTestMetrics() local
105 context.addDeviceBuildInfo("fakeDevice", new BuildInfo()); in testTestMetrics()
[all …]
DEmailResultReporterTest.java52 IInvocationContext context = new InvocationContext(); in testInvocationEnded() local
53 context.addDeviceBuildInfo("fakeDevice", new BuildInfo("888", "mybuild")); in testInvocationEnded()
54 context.setTestTag("mytest"); in testInvocationEnded()
55 mEmailReporter.invocationStarted(context); in testInvocationEnded()
71 IInvocationContext context = new InvocationContext(); in testInvocationEnded_multiBuild() local
72 context.addAllocatedDevice("fakeDevice", EasyMock.createMock(ITestDevice.class)); in testInvocationEnded_multiBuild()
73 context.addDeviceBuildInfo("fakeDevice", new BuildInfo("888", "mybuild")); in testInvocationEnded_multiBuild()
74 context.addAllocatedDevice("fakeDevice2", EasyMock.createMock(ITestDevice.class)); in testInvocationEnded_multiBuild()
75 context.addDeviceBuildInfo("fakeDevice2", new BuildInfo("999", "mybuild2")); in testInvocationEnded_multiBuild()
76 context.setTestTag("mytest"); in testInvocationEnded_multiBuild()
[all …]
DXmlResultReporterTest.java58 public void invocationStarted(IInvocationContext context) { in invocationStarted() argument
106 IInvocationContext context = new InvocationContext(); in testEmptyGeneration() local
107 context.addDeviceBuildInfo("fakeDevice", new BuildInfo("1", "test")); in testEmptyGeneration()
108 context.setTestTag("test"); in testEmptyGeneration()
109 mResultReporter.invocationStarted(context); in testEmptyGeneration()
120 IInvocationContext context = new InvocationContext(); in testSinglePass() local
121 context.addDeviceBuildInfo("fakeDevice", new BuildInfo()); in testSinglePass()
122 context.setTestTag("stub"); in testSinglePass()
123 mResultReporter.invocationStarted(context); in testSinglePass()
144 IInvocationContext context = new InvocationContext(); in testSingleFail() local
[all …]
/tools/metalava/src/main/java/com/android/tools/metalava/model/psi/
DPsiTypeItem.kt77 context: Item?, in toTypeString()
93 context = context, in toTypeString()
108 context = context, in toTypeString()
120 context = context, in toTypeString()
137 context = context, in toTypeString()
152 context = context, in toTypeString()
163 owner = context, in toTypeString()
178 override fun toErasedTypeString(context: Item?): String { in toErasedTypeString()
184 context = context in toErasedTypeString()
223 override fun asTypeParameter(context: MemberItem?): TypeParameterItem? { in asTypeParameter()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/invoker/
DTestInvocationTest.java1410 IInvocationContext context = new InvocationContext(); in testLogDeviceBatteryLevel_placeholderDevice() local
1413 context.addAllocatedDevice("device1", device1); in testLogDeviceBatteryLevel_placeholderDevice()
1415 mTestInvocation.logDeviceBatteryLevel(context, fakeEvent); in testLogDeviceBatteryLevel_placeholderDevice()
1417 assertEquals(0, context.getAttributes().size()); in testLogDeviceBatteryLevel_placeholderDevice()
1427 IInvocationContext context = new InvocationContext(); in testLogDeviceBatteryLevel_physicalDevice() local
1432 context.addAllocatedDevice("device1", device1); in testLogDeviceBatteryLevel_physicalDevice()
1433 context.addDeviceBuildInfo("device1", new BuildInfo()); in testLogDeviceBatteryLevel_physicalDevice()
1435 mTestInvocation.logDeviceBatteryLevel(context, fakeEvent); in testLogDeviceBatteryLevel_physicalDevice()
1437 assertEquals(1, context.getBuildInfo("device1").getBuildAttributes().size()); in testLogDeviceBatteryLevel_physicalDevice()
1440 context.getBuildInfo("device1") in testLogDeviceBatteryLevel_physicalDevice()
[all …]
/tools/test/connectivity/acts/framework/tests/metrics/loggers/
Dbounded_metrics_test.py41 self.context = Mock()
49 self.assertIsNotNone(logger.context)
59 logger.context = self.context
61 logger.context.identifier = 'Class.test'
82 logger.context = self.context
84 logger.context.identifier = 'Class.test'
110 logger.context = self.context
112 logger.context.identifier = 'AwesomeClass.incredible_test'
130 logger.context = self.context
132 logger.context.identifier = 'BestClass'
[all …]
Dblackbox_test.py43 self.context = Mock()
45 self._get_blackbox_identifier = lambda: str(id(self.context))
70 self.assertIsNotNone(logger.context)
80 logger.context = self.context
82 logger.context.identifier = 'Class.test'
101 logger.context = self.context
102 logger.context.identifier = 'Class.test'
118 logger.context = self.context
138 logger.context = self.context
/tools/tradefederation/core/util-apps/WifiUtil/src/com/android/tradefed/utils/wifi/
DWifiMonitorService.java156 private static void clearData(final Context context) { in clearData() argument
157 context.deleteFile(DATA_FILE); in clearData()
161 out = context.openFileOutput(DATA_FILE, 0); in clearData()
177 public static void enable(final Context context, final long interval, in enable() argument
184 clearData(context); in enable()
186 final Intent intent = new Intent(context, WifiMonitorService.class); in enable()
188 final PendingIntent operation = PendingIntent.getService(context, 0, intent, in enable()
190 final AlarmManager alarm = (AlarmManager) context.getSystemService( in enable()
200 public static void disable(final Context context) { in disable() argument
201 final Intent intent = new Intent(context, WifiMonitorService.class); in disable()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/util/
DSubprocessTestResultsParserTest.java367 InvocationContext context = new InvocationContext(); in testParse_testTag() local
368 context.setTestTag("stub"); in testParse_testTag()
376 resultParser = new SubprocessTestResultsParser(mockRunListener, false, context); in testParse_testTag()
384 assertEquals(subTestTag, context.getTestTag()); in testParse_testTag()
395 InvocationContext context = new InvocationContext(); in testParse_testInvocationEndedWithoutBuildInfo() local
396 context.setTestTag("stub"); in testParse_testInvocationEndedWithoutBuildInfo()
404 resultParser = new SubprocessTestResultsParser(mockRunListener, false, context); in testParse_testInvocationEndedWithoutBuildInfo()
418 InvocationContext context = new InvocationContext(); in testParse_testInvocationEnded() local
420 context.setTestTag("stub"); in testParse_testInvocationEnded()
421 context.addDeviceBuildInfo("device1", info); in testParse_testInvocationEnded()
[all …]
/tools/tradefederation/core/src/com/android/tradefed/result/suite/
DXmlSuiteResultFormatter.java153 public void parseSuiteAttributes(XmlPullParser parser, IInvocationContext context) in parseSuiteAttributes() argument
176 public void parseBuildInfoAttributes(XmlPullParser parser, IInvocationContext context) in parseBuildInfoAttributes() argument
213 holder.context.getAttributes().getUniqueMap().get(COMMAND_LINE_ARGS))); in writeResults()
218 Map<Integer, List<String>> serialsShards = holder.context.getShardsSerials(); in writeResults()
221 deviceList = String.join(",", holder.context.getSerials()); in writeResults()
246 for (String key : holder.context.getAttributes().keySet()) { in writeResults()
248 NS, key, String.join(",", holder.context.getAttributes().get(key))); in writeResults()
254 String runHistoryJson = holder.context.getAttributes().getUniqueMap().get(RUN_HISTORY); in writeResults()
468 IInvocationContext context = new InvocationContext(); in parseResults() local
479 context.addInvocationAttribute( in parseResults()
[all …]
/tools/tradefederation/contrib/tests/src/com/android/regression/tests/
DMetricsXmlParserTest.java88 IInvocationContext context = new InvocationContext(); in testSimpleParse() local
89 context.addDeviceBuildInfo("fakeDevice", new BuildInfo()); in testSimpleParse()
90 context.setTestTag("stub"); in testSimpleParse()
91 mResultReporter.invocationStarted(context); in testSimpleParse()
116 IInvocationContext context = new InvocationContext(); in testParse() local
117 context.addDeviceBuildInfo("fakeDevice", new BuildInfo()); in testParse()
118 context.setTestTag("stub"); in testParse()
119 mResultReporter.invocationStarted(context); in testParse()
151 IInvocationContext context = new InvocationContext(); in testParseBlacklist() local
152 context.addDeviceBuildInfo("fakeDevice", new BuildInfo()); in testParseBlacklist()
[all …]
/tools/tradefederation/core/tests/src/com/android/tradefed/result/suite/
DXmlSuiteResultFormatterTest.java85 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()
418 mResultHolder.context.addSerialsFromShard(0, Arrays.asList("serial1", "serial2")); in testDeviceSerials()
419 mResultHolder.context.addSerialsFromShard(1, Arrays.asList("serial3", "serial4")); in testDeviceSerials()
446 mResultHolder.context = mContext; in testBasicFormat_shallow()
[all …]
/tools/test/connectivity/acts/framework/tests/controllers/monsoon_lib/sampling/engine/
Dassembly_line_test.py101 with self.assertRaises(ValueError) as context:
104 self.assertIn('single source', context.exception.args[0])
139 with self.assertRaises(ValueError) as context:
142 self.assertIn('source', context.exception.args[0])
151 with self.assertRaises(ValueError) as context:
154 self.assertIn('built', context.exception.args[0])
194 with self.assertRaises(ValueError) as context:
197 self.assertIn('already built', context.exception.args[0])
203 with self.assertRaises(ValueError) as context:
206 self.assertIn('empty', context.exception.args[0])

12345678910