From f7b708268bf758a2cea294fd7f070be4d78acc6b Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 22 Sep 2021 21:52:26 +0100 Subject: [PATCH] completely borked python segfault, workaround to copy last sim state --- src/soc/simple/test/test_runner.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/soc/simple/test/test_runner.py b/src/soc/simple/test/test_runner.py index 3e478ba8..045e9681 100644 --- a/src/soc/simple/test/test_runner.py +++ b/src/soc/simple/test/test_runner.py @@ -369,6 +369,8 @@ class TestRunner(FHDLTestCase): # 3. Compare ############### + last_sim = copy(sim_states[-1]) + for simstate, hdlstate in zip(sim_states, hdl_states): simstate.compare(hdlstate) # register check simstate.compare_mem(hdlstate) # memory check @@ -389,7 +391,7 @@ class TestRunner(FHDLTestCase): test.expected.state_type = "expected" test.expected.code = 0 # do actual comparison, against last item - sim_states[-1].compare(test.expected) + last_sim.compare(test.expected) self.assertTrue(len(hdl_states) == len(sim_states), "number of instructions run not the same") -- 2.30.2