From: piegames Date: Thu, 24 Jun 2021 22:03:05 +0000 (+0200) Subject: Better error message when tasks failed X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=874d13ff8965a21955a652827cab3488e57f6ad2;p=SymbiYosys.git Better error message when tasks failed --- diff --git a/sbysrc/sby.py b/sbysrc/sby.py index c088aaf..e43458b 100644 --- a/sbysrc/sby.py +++ b/sbysrc/sby.py @@ -423,12 +423,16 @@ def run_job(taskname): return job.retcode +failed = [] retcode = 0 -for t in tasknames: - retcode |= run_job(t) +for task in tasknames: + task_retcode = run_job(task) + retcode |= task_retcode + if task_retcode: + failed.append(task) -if retcode and (len(tasknames) > 1 or tasknames[0] is not None): +if failed and (len(tasknames) > 1 or tasknames[0] is not None): tm = localtime() - print("SBY {:2d}:{:02d}:{:02d} One or more tasks produced a non-zero return code.".format(tm.tm_hour, tm.tm_min, tm.tm_sec)) + print("SBY {:2d}:{:02d}:{:02d} The following tasks failed: {}".format(tm.tm_hour, tm.tm_min, tm.tm_sec, failed)) sys.exit(retcode)