From: Tim Newsome Date: Wed, 13 Jul 2016 17:37:53 +0000 (-0700) Subject: flush spike log after initial write. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fd866d07b277dd3ed8e9888a262dd134c59345e5;p=riscv-tests.git flush spike log after initial write. This makes sure the execution line is the first one in the logfile. --- diff --git a/debug/testlib.py b/debug/testlib.py index 3339e9b..e9b17d0 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -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)