From c70da4d2ba09cf603429f47cc9c1e0aaa54642f7 Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Fri, 12 May 2023 18:03:58 -0700 Subject: [PATCH] allow ignoring FPSCR in tests --- src/openpower/test/state.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/openpower/test/state.py b/src/openpower/test/state.py index aa61d94b..3ce18380 100644 --- a/src/openpower/test/state.py +++ b/src/openpower/test/state.py @@ -132,9 +132,10 @@ class State: (self.state_type, s2.state_type, repr(self.code))) # fpscr - self.dut.assertEqual(self.fpscr, s2.fpscr, - "fpscr mismatch (%s != %s) %s" % - (self.state_type, s2.state_type, repr(self.code))) + if self.fpscr is not None and s2.fpscr is not None: + self.dut.assertEqual( + self.fpscr, s2.fpscr, "fpscr mismatch (%s != %s) %s" % + (self.state_type, s2.state_type, repr(self.code))) def compare_mem(self, s2): # copy dics to preserve state mem then pad empty locs since -- 2.30.2