From: Richard Xia Date: Tue, 23 May 2017 20:38:08 +0000 (-0700) Subject: Fail if simulator exits early. X-Git-Url: https://git.libre-soc.org/?p=riscv-tests.git;a=commitdiff_plain;h=3cd7f374258f7c4ddaa4e0d835a149f185308d28 Fail if simulator exits early. --- 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)