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 | |
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.
-rw-r--r-- | debug/targets.py | 4 | ||||
-rw-r--r-- | debug/testlib.py | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/debug/targets.py b/debug/targets.py index 37759f9..7183a38 100644 --- a/debug/targets.py +++ b/debug/targets.py @@ -24,8 +24,8 @@ class Target(object): # Timeout waiting for the server to start up. This is different than the # GDB timeout, which is how long GDB waits for commands to execute. - # The server_timeout is how long this script waits for the Server to be ready - # for GDB connections. + # The server_timeout is how long this script waits for the Server to be + # ready for GDB connections. server_timeout_sec = 60 # Path to linker script relative to the .py file where the target is 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") |