summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2020-08-07 14:24:54 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-08-08 09:17:49 +0100
commit3ee166c0dd0281880b8ed37008c4419552384fbf (patch)
treef81ce38bb5b84be8110c0208d655ee1903998616 /meta
parent917032944ec71e62ba9e32842ec78e1d1218e2e0 (diff)
downloadpoky-3ee166c0dd0281880b8ed37008c4419552384fbf.tar.gz
oeqa: write @OETestTag content into json test reports for each case
This allows using these tags for classification and filtering of test results according to various organization-specific criteria, such as teams responsible for the test, internal test ids, feature domains and so on. Test name itself meanwhile can stay short and human-readable. (From OE-Core rev: 3801b126eb52cd46efe417111afcd27f05d8f72b) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/core/runner.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py
index 00b7d0bb12..d50690ab37 100644
--- a/meta/lib/oeqa/core/runner.py
+++ b/meta/lib/oeqa/core/runner.py
@@ -195,6 +195,20 @@ class OETestResult(_TestResult):
195 report['log'] = log 195 report['log'] = log
196 if duration: 196 if duration:
197 report['duration'] = duration 197 report['duration'] = duration
198
199 alltags = []
200 # pull tags from the case class
201 if hasattr(case, "__oeqa_testtags"):
202 alltags.extend(getattr(case, "__oeqa_testtags"))
203 # pull tags from the method itself
204 test_name = case._testMethodName
205 if hasattr(case, test_name):
206 method = getattr(case, test_name)
207 if hasattr(method, "__oeqa_testtags"):
208 alltags.extend(getattr(method, "__oeqa_testtags"))
209 if alltags:
210 report['oetags'] = alltags
211
198 if dump_streams and case.id() in self.logged_output: 212 if dump_streams and case.id() in self.logged_output:
199 (stdout, stderr) = self.logged_output[case.id()] 213 (stdout, stderr) = self.logged_output[case.id()]
200 report['stdout'] = stdout 214 report['stdout'] = stdout