[llvm] feff05d - [lit] Fix check-lit hanging on Windows due to a division by zero exception
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 24 10:28:46 PDT 2021
Author: Martin Storsjö
Date: 2021-03-24T19:28:33+02:00
New Revision: feff05d135b317a47cf5ad7f26e7c572b2520d21
URL: https://github.com/llvm/llvm-project/commit/feff05d135b317a47cf5ad7f26e7c572b2520d21
DIFF: https://github.com/llvm/llvm-project/commit/feff05d135b317a47cf5ad7f26e7c572b2520d21.diff
LOG: [lit] Fix check-lit hanging on Windows due to a division by zero exception
Added:
Modified:
llvm/utils/lit/lit/display.py
Removed:
################################################################################
diff --git a/llvm/utils/lit/lit/display.py b/llvm/utils/lit/lit/display.py
index ce346eeebef2c..51a05e8abaf42 100644
--- a/llvm/utils/lit/lit/display.py
+++ b/llvm/utils/lit/lit/display.py
@@ -56,7 +56,9 @@ def update(self, test):
total_time_remaining = self.predictable_time_remaining + unpredictable_time_remaining
total_time = self.time_elapsed + total_time_remaining
- return self.time_elapsed / total_time
+ if total_time > 0:
+ return self.time_elapsed / total_time
+ return 0
class NopDisplay(object):
More information about the llvm-commits
mailing list