From: Tim Newsome Date: Sun, 19 Jun 2016 20:31:51 +0000 (-0700) Subject: Write command to logfile. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3b90da94dcf6b79f8a6fc0dbe6f3225ef9d34c9e;p=riscv-tests.git Write command to logfile. --- diff --git a/debug/testlib.py b/debug/testlib.py index e749a1a..0e5f35d 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -89,6 +89,7 @@ class Openocd(object): if debug: cmd.append("-d") logfile = open("openocd.log", "w") + logfile.write("+ %s\n" % " ".join(cmd)) self.process = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=logfile, stderr=logfile) # TODO: Pick a random port @@ -106,6 +107,7 @@ class Gdb(object): path=os.path.expandvars("$RISCV/bin/riscv64-unknown-elf-gdb")): self.child = pexpect.spawn(path) self.child.logfile = file("gdb.log", "w") + self.child.logfile.write("+ %s\n" % path) self.wait() self.command("set confirm off") self.command("set width 0")