diff options
author | John Newbery <john@johnnewbery.com> | 2017-06-08 09:33:52 -0400 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2017-06-12 09:17:18 -0400 |
commit | 0a4912e46aecef6f04c6287508020ec60424ed24 (patch) | |
tree | f94bd0e8bc4581eff6766ac30a400967239a005a /test | |
parent | 7c51e9f0dc67d8187051071e15ac9c649ea90c65 (diff) |
[tests] timeout integration tests on travis after 20 minutes
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/test_runner.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index 8ccb172d9b..6379021158 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -20,6 +20,7 @@ import datetime import os import time import shutil +import signal import sys import subprocess import tempfile @@ -389,6 +390,10 @@ class TestHandler: time.sleep(.5) for j in self.jobs: (name, time0, proc, log_out, log_err) = j + if os.getenv('TRAVIS') == 'true' and int(time.time() - time0) > 20 * 60: + # In travis, timeout individual tests after 20 minutes (to stop tests hanging and not + # providing useful output. + proc.send_signal(signal.SIGINT) if proc.poll() is not None: log_out.seek(0), log_err.seek(0) [stdout, stderr] = [l.read().decode('utf-8') for l in (log_out, log_err)] |