Skip to content

Feature results junit - #86

Merged
bhcopeland merged 2 commits into
kernelci:masterfrom
roxell:feature-results-junit
Nov 24, 2026
Merged

bhcopeland merged 2 commits into
kernelci:masterfrom
roxell:feature-results-junit

Conversation

@roxell

@roxell roxell commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

Add --results-junit, to write the results as JUnit XML. Many CI systems
can show the test cases from it.

A test without results, like when the board doesn't boot, is an error.
The measurement and the log excerpt go into system-out, and with "-"
the XML goes to stdout. See docs/outputs.md.

@roxell
roxell requested a review from bhcopeland November 20, 2026 23:02
Comment thread tuxrun/results.py
self.__late_signal__ = (signal, test)
return []
else:
first = next_index(lines, f"<LAVA_SIGNAL_STARTTC {case}>")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You want to search with the full name from the log, before the 01_ is stripped... i.e. a board with 01_foo will then get the number stripped off. I believe the bug comes from here (as it wasnt there before)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, it searched without the number. should be fixed now. Thanks @bhcopeland

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now. Although when I re-ran it I saw a odd issue, the same test case name runs twice in one test, the second one can show the first one's result line in its log excerpt. The cause is that the TESTCASE line after a --shell case isn't cleared. Doesn't really seem a blocker though, but might as well see if you can reproduce/fix it your side?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are correct good catch @bhcopeland . should be fixed now

@roxell
roxell force-pushed the feature-results-junit branch from 0c73344 to f856afc Compare November 23, 2026 20:25
On the rpi4 the board runs ahead of LAVA, so the log excerpt of a test
case got the output of the next one.

Take the board output between STARTTC and ENDTC instead, and keep the
rest for the next test cases. Without ENDTC, stop at the next STARTTC.
Drop the TESTCASE line after ENDTC, so a later test case with the same
name doesn't get it.

Also match the whole TEST_CASE_ID, so boot doesn't match boot-kernel.
Search for the name the board prints, like 01_foo, and not the name
without the number.

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Many CI systems can show the test cases of a job from a JUnit XML file.

A test without results, like when the board doesn't boot, is an error.
The measurement and the log excerpt go into system-out. With "-" the
XML goes to stdout.

Suggested-by: Rémi Duraffort <remi.duraffort@linaro.org>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
@roxell
roxell force-pushed the feature-results-junit branch from f856afc to 6bdb2bd Compare November 24, 2026 11:45
@bhcopeland
bhcopeland merged commit 6052f8c into kernelci:master Nov 24, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants