summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/context.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/selftest/context.py')
-rw-r--r--meta/lib/oeqa/selftest/context.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py
index c7dd03ce37..ab13131f29 100644
--- a/meta/lib/oeqa/selftest/context.py
+++ b/meta/lib/oeqa/selftest/context.py
@@ -22,6 +22,17 @@ from oeqa.core.exception import OEQAPreRun, OEQATestNotFound
22 22
23from oeqa.utils.commands import runCmd, get_bb_vars, get_test_layer 23from oeqa.utils.commands import runCmd, get_bb_vars, get_test_layer
24 24
25OESELFTEST_METADATA=["run_all_tests", "run_tests", "skips", "machine", "select_tags", "exclude_tags"]
26
27def get_oeselftest_metadata(args):
28 result = {}
29 raw_args = vars(args)
30 for metadata in OESELFTEST_METADATA:
31 if metadata in raw_args:
32 result[metadata] = raw_args[metadata]
33
34 return result
35
25class NonConcurrentTestSuite(unittest.TestSuite): 36class NonConcurrentTestSuite(unittest.TestSuite):
26 def __init__(self, suite, processes, setupfunc, removefunc): 37 def __init__(self, suite, processes, setupfunc, removefunc):
27 super().__init__([suite]) 38 super().__init__([suite])
@@ -334,12 +345,14 @@ class OESelftestTestContextExecutor(OETestContextExecutor):
334 import platform 345 import platform
335 from oeqa.utils.metadata import metadata_from_bb 346 from oeqa.utils.metadata import metadata_from_bb
336 metadata = metadata_from_bb() 347 metadata = metadata_from_bb()
348 oeselftest_metadata = get_oeselftest_metadata(args)
337 configuration = {'TEST_TYPE': 'oeselftest', 349 configuration = {'TEST_TYPE': 'oeselftest',
338 'STARTTIME': args.test_start_time, 350 'STARTTIME': args.test_start_time,
339 'MACHINE': self.tc.td["MACHINE"], 351 'MACHINE': self.tc.td["MACHINE"],
340 'HOST_DISTRO': oe.lsb.distro_identifier().replace(' ', '-'), 352 'HOST_DISTRO': oe.lsb.distro_identifier().replace(' ', '-'),
341 'HOST_NAME': metadata['hostname'], 353 'HOST_NAME': metadata['hostname'],
342 'LAYERS': metadata['layers']} 354 'LAYERS': metadata['layers'],
355 'OESELFTEST_METADATA': oeselftest_metadata}
343 return configuration 356 return configuration
344 357
345 def get_result_id(self, configuration): 358 def get_result_id(self, configuration):