From 84bca69f0925a4ff0fe3bd88f19a18cf62327fc0 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jan 21 2020 10:35:21 +0000 Subject: Catch exceptions when running the tests so the runner can keep running Signed-off-by: Pierre-Yves Chibon --- diff --git a/runner.py b/runner.py index 820e2f8..53b47fa 100644 --- a/runner.py +++ b/runner.py @@ -36,10 +36,13 @@ def schedule(conf): """ Run the test and schedules the next one. """ delay = conf["delay"] print("Tests started:", datetime.datetime.utcnow()) - #TEST HERE - single_args = conf["workflow_single_gating_args"].split() - monitor_gating.main(single_args) - print("Tests finished:", datetime.datetime.utcnow()) + try: + #TEST HERE + single_args = conf["workflow_single_gating_args"].split() + output = monitor_gating.main(single_args) + print("Tests finished:", datetime.datetime.utcnow()) + except Exception as err: + print(f"Tests failed with: {err}") print(f"Next run in: {delay} seconds") s.enter(delay, 1, schedule, argument=(conf,))