aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@dabbelt.com>2017-05-25 12:14:06 -0700
committerGitHub <noreply@github.com>2017-05-25 12:14:06 -0700
commita9433c4daa287fbe101025f2a079261a10149225 (patch)
tree3b1a68961586706c21a13dae106cda65bd7e0636
parenta4576d335b11378abce1989b6c158bb479fe5fa9 (diff)
parent3cd7f374258f7c4ddaa4e0d835a149f185308d28 (diff)
downloadriscv-tests-a9433c4daa287fbe101025f2a079261a10149225.zip
riscv-tests-a9433c4daa287fbe101025f2a079261a10149225.tar.gz
riscv-tests-a9433c4daa287fbe101025f2a079261a10149225.tar.bz2
Merge pull request #53 from richardxia/fail-if-simulator-exits-early
Fail if simulator exits early.
-rw-r--r--debug/testlib.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/debug/testlib.py b/debug/testlib.py
index b5bd992..3d08e9b 100644
--- a/debug/testlib.py
+++ b/debug/testlib.py
@@ -132,6 +132,12 @@ class VcsSim(object):
stdout=logfile, stderr=logfile)
done = False
while not done:
+ # Fail if VCS exits early
+ exit_code = self.process.poll()
+ if exit_code is not None:
+ raise RuntimeError('VCS simulator exited early with status %d'
+ % exit_code)
+
line = listenfile.readline()
if not line:
time.sleep(1)