sw:vec: Add more termination condition for the test_runner Change-Id: I44b964879255f453c16c942499203eb8983c923c
diff --git a/scripts/test_runner.py b/scripts/test_runner.py index 31ddfff..f1ca8fd 100755 --- a/scripts/test_runner.py +++ b/scripts/test_runner.py
@@ -35,7 +35,11 @@ self.simulator_cmd = simulator_cmd self.buffer = io.StringIO() self.child = None - self.termination_strings = ["main returned", "Exception occurred"] + self.termination_strings = [ + "main returned", + "Exception occurred", + "ReadByte from non existing peripheral" + ] def run(self, timeout=1000): """ Run the simulation command and quit the simulation.""" @@ -128,7 +132,11 @@ ansi_escape = re.compile(r"\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])") output = ansi_escape.sub("", output) print(output) - failure_strings = ["FAILED", "Exception occurred"] + failure_strings = [ + "FAILED", + "Exception occurred", + "ReadByte from non existing peripheral" + ] if any(x in output for x in failure_strings): sys.exit(1) # Grab the return code from the output string with regex