]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
resulttool: junit: improve ptest status handling and log
authorMiroslav Cernak <miroslav.cernak@siemens.com>
Thu, 8 Jan 2026 11:36:46 +0000 (12:36 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 15 Jan 2026 22:46:04 +0000 (22:46 +0000)
commitafcb98ec8aae71505d1ffb33fb9f6d011b0c3d79
treee02dd1f13099208f89b292dbefd9c8a26353e0b1
parent1b231aeabfb83dcd44412a8a39c857d33a399550
resulttool: junit: improve ptest status handling and log

While using resulttool's JUnit export, several issues surfaced
and are addressed here:
- Avoid KeyError when ptest results are missing by guarding access to
  ptest_summary e.g., KeyError: 'bzip2'
- Report actual failures as FAILED instead of SKIPPED and list the failing
  testcase names (e.g., DataSQLite-testrunner, Foundation-testrunner).
- Include testcase names in failure output rather than only the ptest name,
  improving first-read diagnosability.
- Make multiline failure details readable: put full traces in JUnit output;
  for attribute-only messages that cannot contain newlines, collapse ā€œ\nā€ to
  spaces to avoid ā€œ ā€ artifacts in GitLab.

This produces a more accurate and readable JUnit report, prevents crashes
when ptestresult.* lacks entries, and makes CI output actionable on first read.

Signed-off-by: Miroslav Cernak <miroslav.cernak@siemens.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/resulttool/junit.py