From 80873de5323884d942cf23c0164a6cc932e9ab7e Mon Sep 17 00:00:00 2001 From: Julian Lettner Date: Fri, 18 Oct 2019 17:59:46 +0000 Subject: [PATCH] [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. https://reviews.llvm.org/rL375171 llvm-svn: 375264 --- llvm/utils/lit/lit/run.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/llvm/utils/lit/lit/run.py b/llvm/utils/lit/lit/run.py index 29335bd..9cf5713 100644 --- a/llvm/utils/lit/lit/run.py +++ b/llvm/utils/lit/lit/run.py @@ -50,8 +50,9 @@ class Run(object): 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 -- 2.7.4