Skip to content

Commit

Permalink
[Travis][Tests] Add travis ping during create_cache
Browse files Browse the repository at this point in the history
  • Loading branch information
random-zebra committed Dec 20, 2019
1 parent 35ea5bc commit 6a2a3b9
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/functional/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,26 @@ def run_tests(test_list, src_dir, build_dir, exeext, tmpdir, jobs=1, enable_cove

if len(test_list) > 1 and jobs > 1:
# Populate cache
# Send a ping message every 5 minutes to not get stalled on Travis.
import threading
pingTime = 5 * 60
stopTimer = False

def pingTravis():
if stopTimer:
return
print("- Creating cache in progress...")
sys.stdout.flush()
threading.Timer(pingTime, pingTravis).start()

pingTravis()
try:
subprocess.check_output([tests_dir + 'create_cache.py'] + flags + ["--tmpdir=%s/cache" % tmpdir])
except subprocess.CalledProcessError as e:
sys.stdout.buffer.write(e.output)
raise
finally:
stopTimer = True

#Run Tests
job_queue = TestHandler(jobs, tests_dir, tmpdir, test_list, flags)
Expand Down

0 comments on commit 6a2a3b9

Please sign in to comment.