spike passes the download test, but needs a 15 minute timeout. That's
too ridiculous to put in here, but 60s is reasonable.
self.download_c.write("uint32_t length = %d;\n" % length)
self.download_c.write("uint8_t d[%d] = {\n" % length)
self.crc = 0
+ assert length % 16 == 0
for i in range(length / 16):
self.download_c.write(" /* 0x%04x */ " % (i * 16))
for _ in range(16):
def test(self):
self.gdb.load()
self.gdb.command("b _exit")
- self.gdb.c()
+ self.gdb.c(timeout=60)
assertEqual(self.gdb.p("status"), self.crc)
os.unlink(self.download_c.name)
if cmd:
cmd = shlex.split(cmd)
else:
- cmd = ["spike", "-l"]
+ cmd = ["spike"]
if xlen == 32:
cmd += ["--isa", "RV32"]
self.child.expect(r"\(gdb\)", timeout=timeout)
return self.child.before.strip()
- def c(self, wait=True):
+ def c(self, wait=True, timeout=-1):
if wait:
- output = self.command("c")
+ output = self.command("c", timeout=timeout)
assert "Continuing" in output
return output
else: