This is an archive of the discontinued LLVM Phabricator instance.

[lit] Include total elapsed time in xunit output
ClosedPublic

Authored by arichardson on Jul 21 2020, 4:30 AM.

Details

Summary

The time= attribute can also be used for the testsuites tag. While this
attribute appears to be ignored by Jenkins (https://github.com/jenkinsci/junit-plugin/blob/bab34bcc96154a494f8c371953efe06d45813f67/src/main/java/hudson/tasks/junit/SuiteResult.java#L202),
it is still useful if you manually inspect the xml file

Diff Detail

Event Timeline

arichardson created this revision.Jul 21 2020, 4:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 21 2020, 4:30 AM
yln accepted this revision.Jul 22 2020, 12:08 PM

LGTM, thanks!

llvm/utils/lit/lit/reports.py
83

Note: I initially didn't include the overall time here because it is measured by simply doing the following in main.py:

start = time.time()
run_tests(...)
elapsed = time.time() - start

So it's not necessarily exactly equal to the sum of all the individual test times.

This revision is now accepted and ready to land.Jul 22 2020, 12:08 PM
arichardson marked an inline comment as done.Jul 23 2020, 2:28 AM
arichardson added inline comments.
llvm/utils/lit/lit/reports.py
83

Yeah, but I find it quite useful that it shows the real elapsed time when running multiple jobs rather than adding up all individual tests.

This revision was automatically updated to reflect the committed changes.