Occasionally we see:
File "/media/build/poky/meta/lib/oeqa/runtime/cases/ptest.py", line 27, in
test_ptestrunner_expectfail
self.do_ptestrunner()
File "/media/build/poky/meta/lib/oeqa/runtime/cases/ptest.py", line 77, in
do_ptestrunner
results, sections = parser.parse(ptest_runner_log)
File "/media/build/poky/meta/lib/oeqa/utils/logparser.py", line 80, in parse
self.results[current_section['name']][result.group(1).strip()] = t
KeyError: 'No-section'
which occurs when there are "results" outside the main log section. The strace
tests do then upon failure as they dump logs there.
Add code to avoid the tracebacks and just make them warnings.
Signed-off-by: Richard Purdie <[email protected]>
---
meta/lib/oeqa/utils/logparser.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/utils/logparser.py b/meta/lib/oeqa/utils/logparser.py
index 60df754b36f..8054acc853b 100644
--- a/meta/lib/oeqa/utils/logparser.py
+++ b/meta/lib/oeqa/utils/logparser.py
@@ -77,7 +77,10 @@ class PtestParser(object):
for t in test_regex:
result = test_regex[t].search(line)
if result:
-
self.results[current_section['name']][result.group(1).strip()] = t
+ try:
+
self.results[current_section['name']][result.group(1).strip()] = t
+ except KeyError:
+ bb.warn("Result with no section: %s - %s" % (t,
result.group(1).strip()))
# Python performance for repeatedly joining long strings is poor, do
it all at once at the end.
# For 2.1 million lines in a log this reduces 18 hours to 12s.
--
2.39.2
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#183046):
https://lists.openembedded.org/g/openembedded-core/message/183046
Mute This Topic: https://lists.openembedded.org/mt/99573457/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-