summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils/logparser.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2023-04-28 17:51:00 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-05-03 07:33:15 +0100
commit5ad0cf57b41ec7f44647a03bc568d0b24906cc8d (patch)
treeeb8eec61d3ac5759f952d61ada7c35e27ea81306 /meta/lib/oeqa/utils/logparser.py
parent2ee144a0bfb88823bfa788697bb7afc9a572c413 (diff)
downloadopenembedded-core-5ad0cf57b41ec7f44647a03bc568d0b24906cc8d.tar.gz
oeqa/runtime/ptest: Make returning no test results a failure
Ensure that even if a ptests results section is empty, the log parser adds that empty section. Then ensure that empty sections trigger warnings. This means if a ptest suddently stops returning any results, we notice and see warnings about it. This has gone unnoticed on the autobuilder far too many times so is very much worth highlighting as a regression. We shouldn't have empty ptests. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils/logparser.py')
-rw-r--r--meta/lib/oeqa/utils/logparser.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/utils/logparser.py b/meta/lib/oeqa/utils/logparser.py
index 7cb79a8402..60df754b36 100644
--- a/meta/lib/oeqa/utils/logparser.py
+++ b/meta/lib/oeqa/utils/logparser.py
@@ -44,6 +44,8 @@ class PtestParser(object):
result = section_regex['begin'].search(line)
if result:
current_section['name'] = result.group(1)
+ if current_section['name'] not in self.results:
+ self.results[current_section['name']] = {}
continue
result = section_regex['end'].search(line)
@@ -75,8 +77,6 @@ class PtestParser(object):
for t in test_regex:
result = test_regex[t].search(line)
if result:
- if current_section['name'] not in self.results:
- self.results[current_section['name']] = {}
self.results[current_section['name']][result.group(1).strip()] = t
# Python performance for repeatedly joining long strings is poor, do it all at once at the end.