diff options
author | Tim Newsome <tim@sifive.com> | 2016-03-13 16:23:59 -0700 |
---|---|---|
committer | Tim Newsome <tim@sifive.com> | 2016-05-23 12:12:10 -0700 |
commit | 0ba84e9c8ecd025af5e084d66de02df0e016ac40 (patch) | |
tree | b079658501819422ecb57abc013bde097d439738 /tests | |
parent | 64f7d791b703cc81a8f678de37f42185129b6456 (diff) | |
download | spike-0ba84e9c8ecd025af5e084d66de02df0e016ac40.zip spike-0ba84e9c8ecd025af5e084d66de02df0e016ac40.tar.gz spike-0ba84e9c8ecd025af5e084d66de02df0e016ac40.tar.bz2 |
Properly clean up spike.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/gdbserver-smoke.py | 3 | ||||
-rw-r--r-- | tests/testlib.py | 2 |
2 files changed, 3 insertions, 2 deletions
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): |