mirror of
https://git.sr.ht/~kivikakk/niar
synced 2024-12-22 06:52:24 +00:00
cmdrunner: report exit statuses.
This commit is contained in:
parent
6a0c97d1f5
commit
944321f5d9
|
@ -123,13 +123,15 @@ class CommandRunner:
|
|||
|
||||
failed = []
|
||||
for cu, proc in runnables:
|
||||
if proc is not None and proc.wait() != 0:
|
||||
failed.append(cu)
|
||||
if proc is not None:
|
||||
status = proc.wait()
|
||||
if status != 0:
|
||||
failed.append((cu, status))
|
||||
|
||||
if failed:
|
||||
logger.error("the following process(es) failed:")
|
||||
for cu in failed:
|
||||
logger.error(f" {formatted(cu)}")
|
||||
for (cu, status) in failed:
|
||||
logger.error(f" {formatted(cu)} (status={status})")
|
||||
raise CommandFailedError(f"failed {step} step")
|
||||
|
||||
for cu, _ in runnables:
|
||||
|
|
|
@ -286,6 +286,8 @@ def main(np: Project, args):
|
|||
except KeyboardInterrupt:
|
||||
print(file=sys.stderr)
|
||||
logger.log(logging.INFO, "aborting on KeyboardInterrupt")
|
||||
except CommandFailedError:
|
||||
logger.log(logging.INFO, "aborting on CommandFailedError")
|
||||
|
||||
|
||||
def _make_yosys_relative(path):
|
||||
|
|
Loading…
Reference in a new issue