mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
[tests] timeout integration tests on travis after 20 minutes
This commit is contained in:
parent
7c51e9f0dc
commit
0a4912e46a
@ -20,6 +20,7 @@ import datetime
|
|||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
import shutil
|
import shutil
|
||||||
|
import signal
|
||||||
import sys
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
@ -389,6 +390,10 @@ class TestHandler:
|
|||||||
time.sleep(.5)
|
time.sleep(.5)
|
||||||
for j in self.jobs:
|
for j in self.jobs:
|
||||||
(name, time0, proc, log_out, log_err) = j
|
(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:
|
if proc.poll() is not None:
|
||||||
log_out.seek(0), log_err.seek(0)
|
log_out.seek(0), log_err.seek(0)
|
||||||
[stdout, stderr] = [l.read().decode('utf-8') for l in (log_out, log_err)]
|
[stdout, stderr] = [l.read().decode('utf-8') for l in (log_out, log_err)]
|
||||||
|
Loading…
Reference in New Issue
Block a user