diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-04-28 17:51:00 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-05-03 07:33:18 +0100 |
commit | 5caf9e375fcb9793e50772e590de1e137d3887f9 (patch) | |
tree | 1d2d16963ad63ee796d0656f77b5f189ebe9957b /meta/lib/oeqa/utils | |
parent | 9ca04fc169d512579238fff4ba337dcc23e42af4 (diff) | |
download | poky-5caf9e375fcb9793e50772e590de1e137d3887f9.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.
(From OE-Core rev: 5ad0cf57b41ec7f44647a03bc568d0b24906cc8d)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils')
-rw-r--r-- | meta/lib/oeqa/utils/logparser.py | 4 |
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): | |||
44 | result = section_regex['begin'].search(line) | 44 | result = section_regex['begin'].search(line) |
45 | if result: | 45 | if result: |
46 | current_section['name'] = result.group(1) | 46 | current_section['name'] = result.group(1) |
47 | if current_section['name'] not in self.results: | ||
48 | self.results[current_section['name']] = {} | ||
47 | continue | 49 | continue |
48 | 50 | ||
49 | result = section_regex['end'].search(line) | 51 | result = section_regex['end'].search(line) |
@@ -75,8 +77,6 @@ class PtestParser(object): | |||
75 | for t in test_regex: | 77 | for t in test_regex: |
76 | result = test_regex[t].search(line) | 78 | result = test_regex[t].search(line) |
77 | if result: | 79 | if result: |
78 | if current_section['name'] not in self.results: | ||
79 | self.results[current_section['name']] = {} | ||
80 | self.results[current_section['name']][result.group(1).strip()] = t | 80 | self.results[current_section['name']][result.group(1).strip()] = t |
81 | 81 | ||
82 | # Python performance for repeatedly joining long strings is poor, do it all at once at the end. | 82 | # Python performance for repeatedly joining long strings is poor, do it all at once at the end. |