From 0ba84e9c8ecd025af5e084d66de02df0e016ac40 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Sun, 13 Mar 2016 16:23:59 -0700 Subject: [PATCH] Properly clean up spike. --- tests/gdbserver-smoke.py | 3 ++- 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): -- 2.30.2