From: Tim Newsome Date: Sun, 13 Mar 2016 23:23:59 +0000 (-0700) Subject: Properly clean up spike. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0ba84e9c8ecd025af5e084d66de02df0e016ac40;p=riscv-isa-sim.git Properly clean up spike. --- diff --git a/tests/gdbserver-smoke.py b/tests/gdbserver-smoke.py index 9cdac06..770e77a 100755 --- a/tests/gdbserver-smoke.py +++ b/tests/gdbserver-smoke.py @@ -16,8 +16,9 @@ class SmokeTest(unittest.TestCase): self.gdb.command("target extended-remote localhost:9824") self.gdb.command("p i=0"); - def cleanUp(self): + def tearDown(self): self.spike.kill() + self.spike.wait() def test_turbostep(self): """Single step until the program exits. TODO""" diff --git a/tests/testlib.py b/tests/testlib.py index 1f60ce6..04acbfc 100644 --- a/tests/testlib.py +++ b/tests/testlib.py @@ -26,7 +26,7 @@ def spike(binary, halted=False): cmd.append('-H') cmd += ['pk', binary] logfile = open("spike.log", "w") - return subprocess.Popen(cmd, stdout=logfile, stderr=logfile) + return subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=logfile, stderr=logfile) class Gdb(object): def __init__(self):