summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexis Lothoré <alexis.lothore@bootlin.com>2023-02-24 17:45:50 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-02-26 11:52:12 +0000
commit406ec0a87e80d1ee0dd1d246adfe9507c10450ff (patch)
treea0d14e5b51234019edceeb3344a8830e87b21372
parentd8ef15bb9ef652bf85002fe523ff5060b47bca6a (diff)
downloadopenembedded-core-406ec0a87e80d1ee0dd1d246adfe9507c10450ff.tar.gz
scripts/oe-selftest: append metadata to tests results
Many stored results TEST_TYPE are set to "oeselftest", however all those tests are not run with the same sets of parameters, so those tests results may not be comparable. Attach relevant parameters as tests metadata to allow identifying tests configuration so we can compare tests only when they are run with the same parameters. Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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
from oeqa.utils.commands import runCmd, get_bb_vars, get_test_layer
+OESELFTEST_METADATA=["run_all_tests", "run_tests", "skips", "machine", "select_tags", "exclude_tags"]
+
+def get_oeselftest_metadata(args):
+ result = {}
+ raw_args = vars(args)
+ for metadata in OESELFTEST_METADATA:
+ if metadata in raw_args:
+ result[metadata] = raw_args[metadata]
+
+ return result
+
class NonConcurrentTestSuite(unittest.TestSuite):
def __init__(self, suite, processes, setupfunc, removefunc):
super().__init__([suite])
@@ -334,12 +345,14 @@ class OESelftestTestContextExecutor(OETestContextExecutor):
import platform
from oeqa.utils.metadata import metadata_from_bb
metadata = metadata_from_bb()
+ oeselftest_metadata = get_oeselftest_metadata(args)
configuration = {'TEST_TYPE': 'oeselftest',
'STARTTIME': args.test_start_time,
'MACHINE': self.tc.td["MACHINE"],
'HOST_DISTRO': oe.lsb.distro_identifier().replace(' ', '-'),
'HOST_NAME': metadata['hostname'],
- 'LAYERS': metadata['layers']}
+ 'LAYERS': metadata['layers'],
+ 'OESELFTEST_METADATA': oeselftest_metadata}
return configuration
def get_result_id(self, configuration):