From 3cd7f374258f7c4ddaa4e0d835a149f185308d28 Mon Sep 17 00:00:00 2001 From: Richard Xia Date: Tue, 23 May 2017 13:38:08 -0700 Subject: [PATCH] Fail if simulator exits early. --- debug/testlib.py | 6 ++++++ 1 file changed, 6 insertions(+) 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) -- 2.30.2