clear memory is optional
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 24 Dec 2021 13:44:51 +0000 (13:44 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 24 Dec 2021 13:44:51 +0000 (13:44 +0000)
src/openpower/test/runner.py

index e0e8c9a3dc5258538c92315366af871cbdbe363a..55f2f3727a86eab14a6f4d407fee7c054d3a071d 100644 (file)
@@ -209,9 +209,10 @@ class TestRunnerBase(FHDLTestCase):
                     # overwrite (reset) the wb_get memory dictionary with
                     # the test's memory contents (oh, and put the wb_get
                     # memory back in as well)
-                    if self.rom is not None and test.mem is not None:
-                        self.default_mem.clear()
+                    self.default_mem.clear()
+                    if self.rom is not None:
                         self.default_mem.update(deepcopy(self.rom))
+                    if test.mem is not None:
                         self.default_mem.update(deepcopy(test.mem))
 
                     for runner in state_list: