From b6748aee94e56a87f834a921134fe0866bdbec7c Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 19 Dec 2021 20:50:46 +0000 Subject: [PATCH] add "stop at pc" argument to TestCase, used to hard-stop if an instruction at this address is attempted to be executed (without executing it) --- src/openpower/test/common.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/openpower/test/common.py b/src/openpower/test/common.py index fafe8243..5f388a45 100644 --- a/src/openpower/test/common.py +++ b/src/openpower/test/common.py @@ -104,7 +104,8 @@ class TestAccumulatorBase: initial_cr=0, initial_msr=0, initial_mem=None, initial_svstate=0, - expected=None): + expected=None, + stop_at_pc=None): test_name = inspect.stack()[1][3] # name of caller of this function # name of file containing test case @@ -116,6 +117,7 @@ class TestAccumulatorBase: mem=initial_mem, svstate=initial_svstate, expected=expected, + stop_at_pc=stop_at_pc, test_file=test_file) self.test_data.append(tc) @@ -128,6 +130,7 @@ class TestCase: extra_break_addr=None, svstate=0, expected=None, + stop_at_pc=None, test_file=None): self.program = program @@ -148,6 +151,7 @@ class TestCase: self.extra_break_addr = extra_break_addr self.svstate = svstate self.expected = expected # expected results from the test + self.stop_at_pc = stop_at_pc # hard-stop address (do not attempt to run) self.test_file = test_file -- 2.30.2