[llvm] [llvm][llvm-lit] Add total time for each testsuite in JUnit XML output (PR #112230)

David Spickett via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 15 01:50:53 PDT 2024


DavidSpickett wrote:

For context I'm working on merging result files so we can report all tests in one go at the end of the Buildkite CI runs that build PRs.

> There are other "required" elements in that schema that we don't emit; should we be emitting them?

I will see what else is missing that is low friction to add. I suspect a lot of junit consumers are tolerant to missing fields.

> Or are you just particularly interested in the per-testsuite statistic?

I was using https://pypi.org/project/junitparser/ to merge result files and I noticed that the `testsuites time=` was not the sum of the input files. Which made sense given it's not in the schema, so I went looking for where the times are expected to be.

I'm not fixing a specific use case with a specific junit consumer, just speculating that some tools out there may do a better job with this time field added (and in my case I was able to manually add up the testsuites times).

It may also be useful for manual analysis every so often, instead of having to load the file in Python and sum all the times.

https://github.com/llvm/llvm-project/pull/112230


More information about the llvm-commits mailing list