aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@dabbelt.com>2017-03-03 14:11:14 -0800
committerPalmer Dabbelt <palmer@dabbelt.com>2017-03-03 15:18:16 -0800
commit6d30dcee896fd464a2c880a3372706226eedba6a (patch)
treee0d6b079d0bda7f7925301b38833436ddd7e929f
parent2d9d6e87125e79f99c3c65fcb160f97c8e6f23d0 (diff)
downloadriscv-tests-6d30dcee896fd464a2c880a3372706226eedba6a.zip
riscv-tests-6d30dcee896fd464a2c880a3372706226eedba6a.tar.gz
riscv-tests-6d30dcee896fd464a2c880a3372706226eedba6a.tar.bz2
Print an error message when the OpenOCD config file can't be read
-rw-r--r--debug/testlib.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/debug/testlib.py b/debug/testlib.py
index 03ee0b4..3927722 100644
--- a/debug/testlib.py
+++ b/debug/testlib.py
@@ -163,7 +163,12 @@ class Openocd(object):
]
if config:
- cmd += ["-f", find_file(config)]
+ f = find_file(config)
+ if f is None:
+ print("Unable to read file " + config)
+ exit(1)
+
+ cmd += ["-f", f]
if debug:
cmd.append("-d")