From: Jacob Lifshay Date: Mon, 29 Aug 2022 07:27:12 +0000 (-0700) Subject: allow tests to pass None in order to not have to match so, ca, and ov X-Git-Tag: sv_maxu_works-initial~76 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=07f5f22461d5eda844141b2ffd33e021d2b43ffb;p=openpower-isa.git allow tests to pass None in order to not have to match so, ca, and ov --- diff --git a/src/openpower/test/state.py b/src/openpower/test/state.py index c20e75d3..d7b5920c 100644 --- a/src/openpower/test/state.py +++ b/src/openpower/test/state.py @@ -116,12 +116,15 @@ class State: crreg, crreg2)) # XER - self.dut.assertEqual(self.so, s2.so, "so mismatch (%s != %s) %s" % - (self.state_type, s2.state_type, repr(self.code))) - self.dut.assertEqual(self.ov, s2.ov, "ov mismatch (%s != %s) %s" % - (self.state_type, s2.state_type, repr(self.code))) - self.dut.assertEqual(self.ca, s2.ca, "ca mismatch (%s != %s) %s" % - (self.state_type, s2.state_type, repr(self.code))) + if self.so is not None and s2.so is not None: + self.dut.assertEqual(self.so, s2.so, "so mismatch (%s != %s) %s" % + (self.state_type, s2.state_type, repr(self.code))) + if self.ov is not None and s2.ov is not None: + self.dut.assertEqual(self.ov, s2.ov, "ov mismatch (%s != %s) %s" % + (self.state_type, s2.state_type, repr(self.code))) + if self.ca is not None and s2.ca is not None: + self.dut.assertEqual(self.ca, s2.ca, "ca mismatch (%s != %s) %s" % + (self.state_type, s2.state_type, repr(self.code))) # pc self.dut.assertEqual(self.pc, s2.pc, "pc mismatch (%s != %s) %s" %