flush spike log after initial write.
[riscv-tests.git] / debug / testlib.py
index 3339e9b49a88afaf22538f7029ce5e87c48577aa..e9b17d0283bdeb253cab412a24c31907f567f455 100644 (file)
@@ -65,6 +65,7 @@ class Spike(object):
             cmd.append(binary)
         logfile = open("spike.log", "w")
         logfile.write("+ %s\n" % " ".join(cmd))
+        logfile.flush()
         self.process = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=logfile,
                 stderr=logfile)