[lit] Reduce value of synthesized timeouts
Large timeout values (one year, positive infinity) trip up Python on
Windows with "OverflowError: timeout value is too large". One week
seems to work and is still large enough in practice.
Thanks to Simon Pilgrim for helping me test this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375264 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/lit/lit/run.py b/utils/lit/lit/run.py
index 29335bd..9cf5713 100644
@@ -50,8 +50,9 @@
self.failure_count = 0
self.hit_max_failures = False
- one_year = 365 * 24 * 60 * 60 # days * hours * minutes * seconds
- timeout = self.timeout or one_year
+ # Larger timeouts (one year, positive infinity) don't work on Windows.
+ one_week = 7 * 24 * 60 * 60 # days * hours * minutes * seconds
+ timeout = self.timeout or one_week
start = time.time()
deadline = start + timeout