diff options
author | Tim Newsome <tim@sifive.com> | 2016-07-25 11:19:06 -0700 |
---|---|---|
committer | Tim Newsome <tim@sifive.com> | 2016-07-25 11:22:13 -0700 |
commit | bd1caacb3d912c51dfe428b99719f9454c744941 (patch) | |
tree | dde1de7dd926fb2c0da76c36ad201691b1118f01 | |
parent | 7704a62c78afc2c95a61d63deb7da31ccac5b814 (diff) | |
download | riscv-tests-bd1caacb3d912c51dfe428b99719f9454c744941.zip riscv-tests-bd1caacb3d912c51dfe428b99719f9454c744941.tar.gz riscv-tests-bd1caacb3d912c51dfe428b99719f9454c744941.tar.bz2 |
Display log file during build if testing fails.
That way somebody doesn't need to spend forever trying to reproduce a
travis failure when all they really need is the logfile.
-rw-r--r-- | debug/Makefile | 8 | ||||
-rw-r--r-- | debug/README.md | 4 | ||||
-rwxr-xr-x | debug/gdbserver.py | 16 |
3 files changed, 12 insertions, 16 deletions
diff --git a/debug/Makefile b/debug/Makefile index 1d90e12..086cfb9 100644 --- a/debug/Makefile +++ b/debug/Makefile @@ -8,11 +8,9 @@ default: spike$(XLEN).log all: spike32.log spike64.log -spike32.log: - $(GDBSERVER_PY) --isolate --spike32 --cmd $(RISCV_SIM) -- -v > $@ 2>&1 - -spike64.log: - $(GDBSERVER_PY) --isolate --spike --cmd $(RISCV_SIM) -- -v > $@ 2>&1 +%.log: + $(GDBSERVER_PY) --isolate --$(subst .log,,$@) --cmd $(RISCV_SIM) -- -v \ + > $@ 2>&1 || sed s/^/$@:\ / $@ clean: rm -f *.log diff --git a/debug/README.md b/debug/README.md index 829a285..09662ba 100644 --- a/debug/README.md +++ b/debug/README.md @@ -12,7 +12,7 @@ Targets 64-bit Spike ------------ -`./gdbserver.py --spike --cmd $RISCV/bin/spike` +`./gdbserver.py --spike64 --cmd $RISCV/bin/spike` 32-bit Spike ------------ @@ -28,7 +28,7 @@ Debug Tips ========== You can run just a single test by specifying <class>.<function> on the command -line, eg: `./gdbserver.py --spike --cmd $RISCV/bin/spike +line, eg: `./gdbserver.py --spike64 --cmd $RISCV/bin/spike SimpleRegisterTest.test_s0`. Once that test has failed, you can look at gdb.log and (in this case) spike.log to get an idea of what might have gone wrong. diff --git a/debug/gdbserver.py b/debug/gdbserver.py index 0ae75a7..1d5c60e 100755 --- a/debug/gdbserver.py +++ b/debug/gdbserver.py @@ -484,25 +484,23 @@ class Target(object): xlen=self.xlen) return binary_name -class Spike64Target(Target): - name = "spike" - xlen = 64 +class SpikeTarget(Target): + directory = "spike" ram = 0x80010000 ram_size = 5 * 1024 * 1024 instruction_hardware_breakpoint_count = 0 reset_vector = 0x1000 +class Spike64Target(SpikeTarget): + name = "spike64" + xlen = 64 + def server(self): return testlib.Spike(parsed.cmd, halted=True) -class Spike32Target(Target): +class Spike32Target(SpikeTarget): name = "spike32" - directory = "spike" xlen = 32 - ram = 0x80010000 - ram_size = 5 * 1024 * 1024 - instruction_hardware_breakpoint_count = 0 - reset_vector = 0x1000 def server(self): return testlib.Spike(parsed.cmd, halted=True, xlen=32) |