[PATCH] D84230: [lit] Include total elapsed time in xunit output

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 02:28:18 PDT 2020


arichardson marked an inline comment as done.
arichardson added inline comments.


================
Comment at: llvm/utils/lit/lit/reports.py:83
             file.write('<?xml version="1.0" encoding="UTF-8"?>\n')
-            file.write('<testsuites>\n')
+            file.write('<testsuites time="{time:.2f}">\n'.format(time=elapsed))
             for suite, test_iter in tests_by_suite:
----------------
yln wrote:
> 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.
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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84230/new/

https://reviews.llvm.org/D84230





More information about the llvm-commits mailing list