support ignoring integer registers for ExpectedState
authorJacob Lifshay <programmerjake@gmail.com>
Wed, 11 Oct 2023 05:05:49 +0000 (22:05 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Thu, 30 Nov 2023 07:55:28 +0000 (23:55 -0800)
src/openpower/test/state.py

index d32f4b3efdd00338b1b224698346422310aa3a36..50a015208c587d167a0cb6ab3a92c614a0a90cb2 100644 (file)
@@ -170,6 +170,8 @@ class State:
         # Compare int registers
         for i, (intreg, intreg2) in enumerate(
                 zip(self.intregs, s2.intregs)):
+            if intreg is None or intreg2 is None:
+                continue
             log("asserting...reg", i, intreg, intreg2)
             log("code, frepr(code)", self.code, repr(self.code))
             self.dut.assertEqual(intreg, intreg2,