aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2016-07-13 10:37:53 -0700
committerTim Newsome <tim@sifive.com>2016-07-19 11:24:25 -0700
commitfd866d07b277dd3ed8e9888a262dd134c59345e5 (patch)
treec4950e7333ebb03010e040f9090b5d15aea5c7ac
parent3ed5afdc5b7e2c32bc6facf410c8fa091dd55470 (diff)
downloadriscv-tests-fd866d07b277dd3ed8e9888a262dd134c59345e5.zip
riscv-tests-fd866d07b277dd3ed8e9888a262dd134c59345e5.tar.gz
riscv-tests-fd866d07b277dd3ed8e9888a262dd134c59345e5.tar.bz2
flush spike log after initial write.
This makes sure the execution line is the first one in the logfile.
-rw-r--r--debug/testlib.py1
1 files changed, 1 insertions, 0 deletions
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)