From fd866d07b277dd3ed8e9888a262dd134c59345e5 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Wed, 13 Jul 2016 10:37:53 -0700 Subject: [PATCH] flush spike log after initial write. This makes sure the execution line is the first one in the logfile. --- debug/testlib.py | 1 + 1 file changed, 1 insertion(+) 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) -- 2.30.2