From dca3fb5c9658b7a977f7e1205e9d4747c4aa7e7a Mon Sep 17 00:00:00 2001 From: whitequark Date: Sat, 12 Nov 2016 20:11:55 +0000 Subject: [PATCH] artiq_devtool: abort if build failed. --- artiq/frontend/artiq_devtool.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/artiq/frontend/artiq_devtool.py b/artiq/frontend/artiq_devtool.py index 5eb844666..7d4d71f5a 100644 --- a/artiq/frontend/artiq_devtool.py +++ b/artiq/frontend/artiq_devtool.py @@ -83,10 +83,14 @@ def main(): for action in args.actions: if action == "build": logger.info("Building runtime") - subprocess.call(["python3", "-m", "artiq.gateware.targets.kc705", - "-H", "nist_clock", - "--no-compile-gateware", - "--output-dir", "/tmp/kc705"]) + try: + subprocess.check_call(["python3", "-m", "artiq.gateware.targets.kc705", + "-H", "nist_clock", + "--no-compile-gateware", + "--output-dir", "/tmp/kc705"]) + except subprocess.CalledProcessError: + logger.error("Build failed") + sys.exit(1) elif action == "boot": logger.info("Uploading runtime")