[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
Mon Oct 21 02:24:25 PDT 2024
================
@@ -105,12 +105,20 @@ def write_results(self, tests, elapsed):
file.write("</testsuites>\n")
def _write_testsuite(self, file, suite, tests):
- skipped = sum(1 for t in tests if t.result.code in self.skipped_codes)
- failures = sum(1 for t in tests if t.isFailure())
+ skipped = 0
+ failures = 0
+ time = 0.0
+
+ for t in tests:
+ if t.result.code in self.skipped_codes:
+ skipped += 1
+ if t.isFailure():
+ failures += 1
+ time += t.result.elapsed
----------------
DavidSpickett wrote:
Thanks for the report.
https://github.com/llvm/llvm-project/commit/4f06f79c03f8392f63f4430fcfcaefa763cf5c93
https://github.com/llvm/llvm-project/pull/112230
More information about the llvm-commits
mailing list