CI script: set a timeout in case unit tests hang
o9000 mrovi9000@gmail.com
1 files changed,
6 insertions(+),
2 deletions(-)
jump to
M
test/regression.py
→
test/regression.py
@@ -234,8 +234,12 @@ sleep(1)
os.environ["DEBUG_FPS"] = "1" os.environ["ASAN_OPTIONS"] = "detect_leaks=1:exitcode=0" tint2 = run([tint2path, "--test-verbose"], True) - if tint2.poll() != None: - raise RuntimeError("tint2 failed to start") + time_limit = time.time() + 60 + while tint2.poll() == None: + if time.time() < time_limit: + time.sleep(1) + continue + tint2.stop() out, _ = tint2.communicate() exitcode = tint2.returncode if exitcode != 0 and exitcode != 23: