Home
last modified time | relevance | path

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

123456

/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.java153 public void invocationStarted(IInvocationContext context) { in invocationStarted() argument
169 private void logStartInvocation(IInvocationContext context, IConfiguration config) { in logStartInvocation() argument
180 msg.append(context.getTestTag()); in logStartInvocation()
182 for (Entry<ITestDevice, IBuildInfo> entry : context.getDeviceBuildMap().entrySet()) { in logStartInvocation()
192 mStatus = String.format("running %s on build(s) '%s'", context.getTestTag(), in logStartInvocation()
204 IInvocationContext context, in performInvocation() argument
220 ((InvocationContext) context).lockAttributes(); in performInvocation()
222 logDeviceBatteryLevel(context, "initial"); in performInvocation()
226 invocationPath.runDevicePreInvocationSetup(context, config, listener); in performInvocation()
230 prepareAndRun(config, context, invocationPath, listener); in performInvocation()
[all …]
DInvocationExecution.java85 IInvocationContext context, in fetchBuild() argument
92 updateInvocationContext(context, config); in fetchBuild()
94 for (String deviceName : context.getDeviceConfigNames()) { in fetchBuild()
97 ITestDevice device = context.getDevice(deviceName); in fetchBuild()
102 ((IInvocationContextReceiver) provider).setInvocationContext(context); in fetchBuild()
113 context.addDeviceBuildInfo(deviceName, info); in fetchBuild()
122 context.addDeviceBuildInfo(currentDeviceName, notFoundStub); in fetchBuild()
134 context.addDeviceBuildInfo(currentDeviceName, errorBuild); in fetchBuild()
135 updateInvocationContext(context, config); in fetchBuild()
139 createSharedResources(context); in fetchBuild()
[all …]
DIInvocationExecution.java49 IInvocationContext context, in fetchBuild() argument
63 public default void cleanUpBuilds(IInvocationContext context, IConfiguration config) {} in cleanUpBuilds() argument
77 IInvocationContext context, in doSetup() argument
93 IInvocationContext context, IConfiguration config, ITestLogger logger) in runDevicePreInvocationSetup() argument
104 IInvocationContext context, IConfiguration config) {} in runDevicePostInvocationTearDown() argument
117 IInvocationContext context, in doTeardown() argument
132 IInvocationContext context, IConfiguration config, Throwable exception) {} in doCleanUp() argument
148 IConfiguration config, IInvocationContext context, IRescheduler rescheduler) { in shardConfig() argument
161 IInvocationContext context, IConfiguration config, ITestInvocationListener listener) in runTests() argument
177 IInvocationContext context); in resetBuildAndReschedule() argument
/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/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/result/
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 …]
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 …]
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/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/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/test/connectivity/acts/framework/tests/metrics/loggers/
Dblackbox_test.py40 self.context = Mock()
42 self._get_blackbox_identifier = lambda: str(id(self.context))
80 self.assertIsNotNone(logger.context)
90 logger.context = self.context
92 logger.context.identifier = 'Class.test'
99 self.assertEqual(result.metric_value, self.context.test_class.result)
110 logger.context = self.context
117 getattr(self.context.test_class, result_attr))
130 logger.context = self.context
149 logger.context = self.context
[all …]
/tools/tradefederation/core/src/com/android/tradefed/invoker/monitor/
DInvocationTracker.java40 public InvocationTracker(IInvocationContext context) { in InvocationTracker() argument
44 mInvocationContext.put(context, false); in InvocationTracker()
45 mInvocationData.mInvocationId = context.getInvocationId(); in InvocationTracker()
55 public boolean hasInvocation(IInvocationContext context) { in hasInvocation() argument
56 return mInvocationContext.containsKey(context); in hasInvocation()
60 public void addInvocationTracking(IInvocationContext context) { in addInvocationTracking() argument
61 mInvocationContext.put(context, false); in addInvocationTracking()
70 public synchronized void invocationDone(IInvocationContext context) { in invocationDone() argument
71 if (mInvocationContext.containsKey(context)) { in invocationDone()
72 mInvocationContext.put(context, true); in invocationDone()
DInvocationsMonitor.java64 public synchronized void trackInvocation(IInvocationContext context) { in trackInvocation() argument
65 String invocationId = context.getInvocationId(); in trackInvocation()
68 info.addInvocationTracking(context); in trackInvocation()
70 mInvocationInfo.put(invocationId, new InvocationTracker(context)); in trackInvocation()
95 public synchronized void untrackInvocation(IInvocationContext context) { in untrackInvocation() argument
96 String invocationId = context.getInvocationId(); in untrackInvocation()
99 if (info.hasInvocation(context)) { in untrackInvocation()
100 info.invocationDone(context); in untrackInvocation()
/tools/tradefederation/core/src/com/android/tradefed/invoker/sandbox/
DParentSandboxInvocationExecution.java49 IInvocationContext context, in fetchBuild() argument
54 if (!context.getBuildInfos().isEmpty()) { in fetchBuild()
58 context.getBuildInfos()); in fetchBuild()
61 return super.fetchBuild(context, config, rescheduler, listener); in fetchBuild()
66 IInvocationContext context, IConfiguration config, ITestInvocationListener listener) in doSetup() argument
74 super.doSetup(context, mParentPreparerConfig, listener); in doSetup()
79 IInvocationContext context, in doTeardown() argument
92 super.doTeardown(context, mParentPreparerConfig, logger, exception); in doTeardown()
96 public void doCleanUp(IInvocationContext context, IConfiguration config, Throwable exception) { in doCleanUp() argument
102 super.doCleanUp(context, mParentPreparerConfig, exception); in doCleanUp()
[all …]
/tools/tradefederation/core/src/com/android/tradefed/invoker/shard/
DShardHelper.java88 IConfiguration config, IInvocationContext context, IRescheduler rescheduler) { in shardConfig() argument
93 isSharded |= shardTest(shardableTests, test, shardCount, context); in shardConfig()
109 config.getLogSaver().invocationStarted(context); in shardConfig()
110 resultCollector.invocationStarted(context); in shardConfig()
130 rescheduleConfig(shardConfig, config, context, rescheduler, resultCollector, i); in shardConfig()
149 rescheduleConfig(shardConfig, config, context, rescheduler, resultCollector, i); in shardConfig()
155 for (String deviceName : context.getDeviceConfigNames()) { in shardConfig()
158 .cleanUp(context.getBuildInfo(deviceName)); in shardConfig()
166 IInvocationContext context, in rescheduleConfig() argument
171 ShardBuildCloner.cloneBuildInfos(config, shardConfig, context); in rescheduleConfig()
[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/metalava/src/main/java/com/android/tools/metalava/model/psi/
DPsiTypeItem.kt76 context: Item?, in toTypeString()
92 context = context, in toTypeString()
107 context = context, in toTypeString()
119 context = context, in toTypeString()
136 context = context, in toTypeString()
151 context = context, in toTypeString()
162 owner = context, in toTypeString()
177 override fun toErasedTypeString(context: Item?): String { in toErasedTypeString()
183 context = context in toErasedTypeString()
222 override fun asTypeParameter(context: MemberItem?): TypeParameterItem? { in asTypeParameter()
[all …]
/tools/test/graphicsbenchmark/functional_tests/java/src/com/android/game/qualification/tests/
DChoreoTestActivity.java45 public ChoreoTestView(Context context) { in ChoreoTestView() argument
46 super(context); in ChoreoTestView()
73 public ChoreoTestView(Context context, AttributeSet attrs) { in ChoreoTestView() argument
74 super(context, attrs); in ChoreoTestView()
77 public ChoreoTestView(Context context, AttributeSet attrs, int defStyleAttr) { in ChoreoTestView() argument
78 super(context, attrs, defStyleAttr); in ChoreoTestView()
81 … public ChoreoTestView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { in ChoreoTestView() argument
82 super(context, attrs, defStyleAttr, defStyleRes); in ChoreoTestView()
DSurfaceFlingerTestActivity.java70 public TestView(Context context) { in TestView() argument
71 super(context); in TestView()
97 public TestView(Context context, AttributeSet attrs) { in TestView() argument
98 super(context, attrs); in TestView()
101 public TestView(Context context, AttributeSet attrs, int defStyleAttr) { in TestView() argument
102 super(context, attrs, defStyleAttr); in TestView()
105 public TestView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { in TestView() argument
106 super(context, attrs, defStyleAttr, defStyleRes); in TestView()
/tools/tradefederation/core/util-apps/DeviceSetupUtil/src/com/android/tradefed/utils/
DDeviceSetupIntentReceiver.java37 public void onReceive(Context context, Intent intent) { in onReceive() argument
40 intent.setClass(context, DeviceSetupService.class); in onReceive()
41 context.startService(intent); in onReceive()
46 intent.setClass(context, DeviceSetupService.class); in onReceive()
47 context.stopService(intent); in onReceive()
52 intent.setClass(context, DeviceSetupService.class); in onReceive()
53 context.startService(intent); in onReceive()
/tools/tradefederation/core/tests/src/com/android/tradefed/invoker/
DInvocationContextTest.java154 InvocationContext context = new InvocationContext(); in testProtoSerialize() local
157 context.setConfigurationDescriptor(descriptor); in testProtoSerialize()
158 context.setTestTag("tag"); in testProtoSerialize()
159 context.addInvocationAttribute("test_key", "test_value"); in testProtoSerialize()
160 Context protoContext = context.toProto(); in testProtoSerialize()
175 InvocationContext context = new InvocationContext(); in testProtoSerialize_moduleContext() local
178 context.setConfigurationDescriptor(descriptor); in testProtoSerialize_moduleContext()
183 context.setModuleInvocationContext(moduleContext); in testProtoSerialize_moduleContext()
185 Context protoContext = context.toProto(); in testProtoSerialize_moduleContext()
/tools/tradefederation/core/tests/src/com/android/tradefed/util/
DSubprocessTestResultsParserTest.java333 InvocationContext context = new InvocationContext(); in testParse_testTag() local
334 context.setTestTag("stub"); in testParse_testTag()
342 resultParser = new SubprocessTestResultsParser(mockRunListener, false, context); in testParse_testTag()
350 assertEquals(subTestTag, context.getTestTag()); in testParse_testTag()
361 InvocationContext context = new InvocationContext(); in testParse_testInvocationEndedWithoutBuildInfo() local
362 context.setTestTag("stub"); in testParse_testInvocationEndedWithoutBuildInfo()
370 resultParser = new SubprocessTestResultsParser(mockRunListener, false, context); in testParse_testInvocationEndedWithoutBuildInfo()
384 InvocationContext context = new InvocationContext(); in testParse_testInvocationEnded() local
386 context.setTestTag("stub"); in testParse_testInvocationEnded()
387 context.addDeviceBuildInfo("device1", info); in testParse_testInvocationEnded()
[all …]
/tools/test/connectivity/acts/framework/acts/metrics/
Dcore.py75 def __init__(self, context): argument
82 if not context:
84 self.context = context
114 context, argument
130 super().__init__(context)
138 return os.path.join(self.context.get_full_output_path(),

123456