use append on expected state dump, not ideal but
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 11 Nov 2021 09:40:33 +0000 (09:40 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 11 Nov 2021 09:40:33 +0000 (09:40 +0000)
gives multiple results

src/openpower/test/state.py

index 735d19253d9461fe41b915d5c33162c9552418be..7995a8bcb65f1391168d84cc777cf2f50b06f073 100644 (file)
@@ -228,7 +228,7 @@ class ExpectedState(State):
             path += testfile + '/'
         os.makedirs(path, exist_ok=True)
 
-        with open("%s%s.py" % (path, testname), "w") as sout:
+        with open("%s%s.py" % (path, testname), "a") as sout:
             # pc and intregs
             sout.write("%se = ExpectedState(pc=%d)\n" % (lindent, state.pc))
             for i, reg in enumerate(state.intregs):