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>