Commit ff37a2c0 authored by Denis Bilenko's avatar Denis Bilenko

make testrunner.py use mysubprocess.py

parent 64cd7c2b
...@@ -215,18 +215,7 @@ def run_tests(options, args): ...@@ -215,18 +215,7 @@ def run_tests(options, args):
def run_subprocess(arg, options): def run_subprocess(arg, options):
from threading import Timer from threading import Timer
import subprocess from mysubprocess import Popen, PIPE, STDOUT
if hasattr(subprocess.Popen, 'kill'):
Popen = subprocess.Popen
else:
class Popen(subprocess.Popen):
def kill(self):
try:
from os import kill
kill(self.pid, 9)
except ImportError:
pass
popen_args = [sys.executable, sys.argv[0], '--record', popen_args = [sys.executable, sys.argv[0], '--record',
'--runid', options.runid, '--runid', options.runid,
...@@ -236,7 +225,7 @@ def run_subprocess(arg, options): ...@@ -236,7 +225,7 @@ def run_subprocess(arg, options):
popen_args += [arg] popen_args += [arg]
popen_args = [str(x) for x in popen_args] popen_args = [str(x) for x in popen_args]
if options.capture: if options.capture:
popen = Popen(popen_args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=False) popen = Popen(popen_args, stdout=PIPE, stderr=STDOUT, shell=False)
else: else:
popen = Popen(popen_args, shell=False) popen = Popen(popen_args, shell=False)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment