Properly clean up spike.
[riscv-isa-sim.git] / tests / testlib.py
index 1f60ce6b188e10c6fdc55f5af3379eaf54655273..04acbfc32993fe703a7b48f9c2f8bcbbe2449a62 100644 (file)
@@ -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):