Skip to content

Fixes to run_project_tests XML log#15620

Open
jon-turney wants to merge 3 commits intomesonbuild:masterfrom
jon-turney:testlog-xml-fixes
Open

Fixes to run_project_tests XML log#15620
jon-turney wants to merge 3 commits intomesonbuild:masterfrom
jon-turney:testlog-xml-fixes

Conversation

@jon-turney
Copy link
Member

Fix a couple of issues I noticed with the meson-test-run.xml file produced by run_project_tests.

  • Every testcase node's time attribute is the total elapsed time, rather than the time it took to run that test.
  • All testcase nodes are children of the testsuite node created for the last testsuite listed.

However, since nobody seems to have noticed these problems since the last time I looked at this piece of code in #8917, I'm not sure if this file is actually being used by anyone?

Maybe we should remove it? or in the alternative, remove the meson-test-run.txt since having both just seems pointless.

Annotate each testcase with the time to run the test, not the total
elapsed time.

This is wrong by my reading of the JUnit XML schema, and doesn't seem
very useful. It looks like this has been wrong since forever.
Unfortunately, the idiot who wrote bee4dc9 (me!) assumed that the 'test
category' (the 'testsuite' name) is the same as the directory. (That is,
that TestCategory.category == TestCategory.subdir).

These are not the same (e.g. 'failing-test' vs 'failing test' etc.)
which is why they are separate things.

Rather than adding yet another function argument to pass yet another
attribute of the TestCategory object around, just pass the object itself.
At the moment, all testcases are children of the last testsuite listed.

It seems like this was something I failed to notice in bee4dc9, which
only fixed the classname in the testcase node, not it's parent.
@jon-turney jon-turney requested a review from jpakkane as a code owner March 13, 2026 17:14
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.

1 participant