Home
last modified time | relevance | path

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

12345678

/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/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/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 …]
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 …]
DDeviceUnavailEmailResultReporterTest.java51 IInvocationContext context = new InvocationContext(); in testGenerateEmailSubject() local
52 context.addAllocatedDevice("fakeDevice", EasyMock.createMock(ITestDevice.class)); in testGenerateEmailSubject()
53 context.addDeviceBuildInfo("fakeDevice", new BuildInfo("888", "mybuild")); in testGenerateEmailSubject()
54 mDnaeEmailReporter.invocationStarted(context); in testGenerateEmailSubject()
/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/contrib/src/com/android/tradefed/
DHelloWorldMultiDevices.java40 IInvocationContext context = testInfo.getContext(); in run() local
43 for (ITestDevice device : context.getDevices()) { in run()
46 device.getSerialNumber(), context.getBuildInfo(device)); in run()
50 for (String deviceName : context.getDeviceConfigNames()) { in run()
53 context.getDevice(deviceName).getSerialNumber(), deviceName); in run()
57 Assert.assertNotNull(context.getDevice("device1")); in run()
60 context.getDevice("device1").getSerialNumber()); in run()
/tools/tradefederation/core/src/com/android/tradefed/invoker/
DTestInvocation.java170 private void logStartInvocation(IInvocationContext context, IConfiguration config) { in logStartInvocation() argument
181 msg.append(context.getTestTag()); in logStartInvocation()
183 for (Entry<ITestDevice, IBuildInfo> entry : context.getDeviceBuildMap().entrySet()) { in logStartInvocation()
193 mStatus = String.format("running %s on build(s) '%s'", context.getTestTag(), in logStartInvocation()
219 IInvocationContext context = testInfo.getContext(); in performInvocation() local
222 ((InvocationContext) context).lockAttributes(); in performInvocation()
224 logDeviceBatteryLevel(context, "initial"); in performInvocation()
228 invocationPath.runDevicePreInvocationSetup(context, config, listener); in performInvocation()
238 badDevice = context.getDeviceBySerial(e.getDeviceSerial()); in performInvocation()
242 context.setRecoveryModeForAllDevices(RecoveryMode.NONE); in performInvocation()
[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/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/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/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/proto/
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/test/connectivity/acts/tests/google/fuchsia/wlan/
DWlanRvrTest.py19 from acts import context
210 output_path = context.get_current_context().get_base_output_path()
211 test_class_name = context.get_current_context().test_class_name
573 context.get_current_context().get_full_output_path(),
578 context.get_current_context().get_full_output_path(), graph_data)
593 context.get_current_context().get_full_output_path(),
598 context.get_current_context().get_full_output_path(), graph_data)
613 context.get_current_context().get_full_output_path(),
618 context.get_current_context().get_full_output_path(), graph_data)
633 context.get_current_context().get_full_output_path(),
[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(),
/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/test_framework/com/android/tradefed/targetprep/multi/
DMergeMultiBuildTargetPreparer.java61 public void setUp(IInvocationContext context) in setUp() argument
64 IBuildInfo providerInfo = context.getBuildInfo(mProvider); in setUp()
70 context.getDevices().get(0).getDeviceDescriptor()); in setUp()
72 IBuildInfo receiverInfo = context.getBuildInfo(mReceiver); in setUp()
78 context.getDevices().get(0).getDeviceDescriptor()); in setUp()
/tools/tradefederation/core/src/com/android/tradefed/testtype/suite/module/
DBaseModuleController.java52 public final RunStrategy shouldRunModule(IInvocationContext context) { in shouldRunModule() argument
53 mContext = context; in shouldRunModule()
54 return shouldRun(context); in shouldRunModule()
63 public abstract RunStrategy shouldRun(IInvocationContext context); in shouldRun() argument
/tools/test/graphicsbenchmark/benchmark_libs/
Dagq.cpp81 void startLoop(jobject context);
86 void GameQualification::Impl::startLoop(jobject context) { in startLoop() argument
94 env->CallVoidMethod(context, method, createIntent()); in startLoop()
112 void GameQualification::startLoop(jobject context) { in startLoop() argument
113 mImpl->startLoop(context); in startLoop()
/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])
/tools/tradefederation/core/src/com/android/tradefed/invoker/shard/
DShardBuildCloner.java46 IInvocationContext context = testInfo.getContext(); in cloneBuildInfos() local
48 for (String deviceName : context.getDeviceConfigNames()) { in cloneBuildInfos()
49 IBuildInfo toBuild = context.getBuildInfo(deviceName).clone(); in cloneBuildInfos()
60 deviceName, context.getDeviceConfigNames())); in cloneBuildInfos()
72 IBuildInfo primaryBuild = context.getBuildInfos().get(0); in cloneBuildInfos()
75 TestInformation newInfo = TestInformation.createCopyTestInfo(testInfo, context); in cloneBuildInfos()
/tools/test/connectivity/acts/framework/tests/metrics/loggers/
Dblackbox_test.py44 self.context = Mock()
46 self._get_blackbox_identifier = lambda: str(id(self.context))
76 self.assertIsNotNone(logger.context)
86 logger.context = self.context
88 logger.context.identifier = 'Class.test'
107 logger.context = self.context
108 logger.context.identifier = 'Class.test'
124 logger.context = self.context
144 logger.context = self.context
/tools/tradefederation/core/atest/
Dtest_mapping_unittest.py44 with self.assertRaises(Exception) as context:
47 'Each option can only have one key.', str(context.exception))
51 with self.assertRaises(Exception) as context:
54 'host can only have boolean value.', str(context.exception))

12345678