]> granicus.if.org Git - python/commitdiff
Issue #9433: The "-j" option to regrtest now works under Windows too.
authorAntoine Pitrou <solipsis@pitrou.net>
Wed, 18 Aug 2010 20:44:14 +0000 (20:44 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Wed, 18 Aug 2010 20:44:14 +0000 (20:44 +0000)
It is not sure it will be beneficial, though, since process launching is
more expensive under Windows than it is under Linux.

Lib/test/regrtest.py

index 9c4584c54c55727b58e36e9b40a5127de53f7678..308baf462760ff150fb72600da2f56df2ea11a97 100755 (executable)
@@ -547,7 +547,8 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
                     popen = Popen([sys.executable, '-E', '-m', 'test.regrtest',
                                    '--slaveargs', json.dumps(args_tuple)],
                                    stdout=PIPE, stderr=PIPE,
-                                   universal_newlines=True, close_fds=True)
+                                   universal_newlines=True,
+                                   close_fds=(os.name != 'nt'))
                     stdout, stderr = popen.communicate()
                     # Strip last refcount output line if it exists, since it
                     # comes from the shutdown of the interpreter in the subcommand.