diff options
author | Tim Newsome <tim@sifive.com> | 2017-08-14 15:24:41 -0700 |
---|---|---|
committer | Tim Newsome <tim@sifive.com> | 2017-08-14 15:24:41 -0700 |
commit | 311680cad866d9a2a13aec44a1b615eb6cebe6a5 (patch) | |
tree | eb96420e0a100ec31edbb39481750d4b82e6c6e8 /debug/testlib.py | |
parent | 489838cc68e8c332ed49d189be13212c46716445 (diff) | |
download | riscv-tests-311680cad866d9a2a13aec44a1b615eb6cebe6a5.zip riscv-tests-311680cad866d9a2a13aec44a1b615eb6cebe6a5.tar.gz riscv-tests-311680cad866d9a2a13aec44a1b615eb6cebe6a5.tar.bz2 |
Put logfile code back so everything works again.
I don't exactly understand why it has to be the way it is, but I just
want it to work.
Also fix a pylint complaint.
Diffstat (limited to 'debug/testlib.py')
-rw-r--r-- | debug/testlib.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/debug/testlib.py b/debug/testlib.py index 23f937b..b76f320 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -197,7 +197,7 @@ class Openocd(object): if debug: cmd.append("-d") - logfile = Openocd.logfile + logfile = open(Openocd.logname, "w") logfile.write("+ %s\n" % " ".join(cmd)) logfile.flush() self.process = subprocess.Popen(cmd, stdin=subprocess.PIPE, @@ -282,7 +282,8 @@ class Gdb(object): def __init__(self, cmd=os.path.expandvars("$RISCV/bin/riscv64-unknown-elf-gdb")): self.child = pexpect.spawn(cmd) - Gdb.logfile.write("+ %s\n" % cmd) + self.child.logfile = open(self.logname, "w") + self.child.logfile.write("+ %s\n" % cmd) self.wait() self.command("set confirm off") self.command("set width 0") |