[llvm] 4f06f79 - [llvm][llvm-lit] Handle testsuite elapsed time being None

David Spickett via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 21 02:22:38 PDT 2024


Author: David Spickett
Date: 2024-10-21T09:10:35Z
New Revision: 4f06f79c03f8392f63f4430fcfcaefa763cf5c93

URL: https://github.com/llvm/llvm-project/commit/4f06f79c03f8392f63f4430fcfcaefa763cf5c93
DIFF: https://github.com/llvm/llvm-project/commit/4f06f79c03f8392f63f4430fcfcaefa763cf5c93.diff

LOG: [llvm][llvm-lit] Handle testsuite elapsed time being None

The time for all testsuites will always exist because lit
measures it itself. For a given testsuite, I guess that it
can be None if for example the suite is empty.

Added: 
    

Modified: 
    llvm/utils/lit/lit/reports.py

Removed: 
    


################################################################################
diff  --git a/llvm/utils/lit/lit/reports.py b/llvm/utils/lit/lit/reports.py
index d2d719b076bc70..8ec83d698ae86a 100755
--- a/llvm/utils/lit/lit/reports.py
+++ b/llvm/utils/lit/lit/reports.py
@@ -114,7 +114,7 @@ def _write_testsuite(self, file, suite, tests):
                 skipped += 1
             if t.isFailure():
                 failures += 1
-            time += t.result.elapsed
+            time += t.result.elapsed or 0.0
 
         name = suite.config.name.replace(".", "-")
         file.write(


        


More information about the llvm-commits mailing list