Show More
@@ -722,19 +722,19 b' class Test(unittest.TestCase):' | |||
|
722 | 722 | # Failed is denoted by AssertionError (by default at least). |
|
723 | 723 | raise AssertionError(msg) |
|
724 | 724 | |
|
725 |
def _runcommand(self, cmd, |
|
|
726 | timeout=None): | |
|
725 | def _runcommand(self, cmd, replacements, env): | |
|
727 | 726 | """Run command in a sub-process, capturing the output (stdout and |
|
728 | 727 | stderr). |
|
729 | 728 | |
|
730 | 729 | Return a tuple (exitcode, output). output is None in debug mode. |
|
731 | 730 | """ |
|
732 | if debug: | |
|
733 |
proc = subprocess.Popen(cmd, shell=True, cwd= |
|
|
731 | if self._debug: | |
|
732 | proc = subprocess.Popen(cmd, shell=True, cwd=self._testtmp, | |
|
733 | env=env) | |
|
734 | 734 | ret = proc.wait() |
|
735 | 735 | return (ret, None) |
|
736 | 736 | |
|
737 |
proc = Popen4(cmd, |
|
|
737 | proc = Popen4(cmd, self._testtmp, self._timeout, env) | |
|
738 | 738 | def cleanup(): |
|
739 | 739 | terminate(proc) |
|
740 | 740 | ret = proc.wait() |
@@ -780,8 +780,7 b' class PythonTest(Test):' | |||
|
780 | 780 | vlog("# Running", cmd) |
|
781 | 781 | if os.name == 'nt': |
|
782 | 782 | replacements.append((r'\r\n', '\n')) |
|
783 |
result = self._runcommand(cmd, |
|
|
784 | debug=self._debug, timeout=self._timeout) | |
|
783 | result = self._runcommand(cmd, replacements, env) | |
|
785 | 784 | if self._aborted: |
|
786 | 785 | raise KeyboardInterrupt() |
|
787 | 786 | |
@@ -828,9 +827,7 b' class TTest(Test):' | |||
|
828 | 827 | cmd = '%s "%s"' % (self._shell, fname) |
|
829 | 828 | vlog("# Running", cmd) |
|
830 | 829 | |
|
831 |
exitcode, output = self._runcommand(cmd, |
|
|
832 | env, debug=self._debug, | |
|
833 | timeout=self._timeout) | |
|
830 | exitcode, output = self._runcommand(cmd, replacements, env) | |
|
834 | 831 | |
|
835 | 832 | if self._aborted: |
|
836 | 833 | raise KeyboardInterrupt() |
General Comments 0
You need to be logged in to leave comments.
Login now