aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_runner.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/test_runner.py')
-rwxr-xr-xtest/functional/test_runner.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py
index c7de31510a..0dca318af8 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
@@ -78,7 +79,7 @@ BASE_SCRIPTS= [
'rawtransactions.py',
'reindex.py',
# vv Tests less than 30s vv
- "zmq_test.py",
+ 'zmq_test.py',
'mempool_resurrect_test.py',
'txn_doublespend.py --mineblock',
'txn_clone.py',
@@ -390,6 +391,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)]