bit more verbose info about number of instructions run
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 18 Dec 2021 18:46:44 +0000 (18:46 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 18 Dec 2021 18:46:44 +0000 (18:46 +0000)
src/openpower/test/runner.py

index 1bce1f39ac6fe66df47d1fb948ea6a1148471dda..8987c3f13522e33038ed0ee88f06e49614b8a7a3 100644 (file)
@@ -306,9 +306,13 @@ class TestRunnerBase(FHDLTestCase):
                         # do actual comparison, against last item
                         last_sim.compare(test.expected)
 
+                    # check number of instructions run (sanity)
                     if self.run_hdl and self.run_sim:
-                        self.assertTrue(len(hdl_states) == len(sim_states),
-                                    "number of instructions run not the same")
+                        n_hdl = len(hdl_states)
+                        n_sim = len(sim_states)
+                        self.assertTrue(n_hdl == n_sim,
+                                    "number of instructions %d %d "
+                                    "run not the same" % (n_hdl, n_sim))
 
                 ###### END OF A TEST #######
                 # StateRunner.end_test()