Issue #15300: Ensure the temporary test working directories are in the same parent folder when running tests in multiprocess mode from a Python build.

Patch by Chris Jerdonek.
This commit is contained in:
Antoine Pitrou 2012-07-11 19:19:14 +02:00
parent 67097fd592
commit 282083d5f4
3 changed files with 10 additions and 1 deletions

View file

@ -572,10 +572,14 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
output.put((None, None, None, None)) output.put((None, None, None, None))
return return
# -E is needed by some tests, e.g. test_import # -E is needed by some tests, e.g. test_import
# Running the child from the same working directory ensures
# that TEMPDIR for the child is the same when
# sysconfig.is_python_build() is true. See issue 15300.
popen = Popen(base_cmd + ['--slaveargs', json.dumps(args_tuple)], popen = Popen(base_cmd + ['--slaveargs', json.dumps(args_tuple)],
stdout=PIPE, stderr=PIPE, stdout=PIPE, stderr=PIPE,
universal_newlines=True, universal_newlines=True,
close_fds=(os.name != 'nt')) close_fds=(os.name != 'nt'),
cwd=support.SAVEDCWD)
stdout, stderr = popen.communicate() stdout, stderr = popen.communicate()
# Strip last refcount output line if it exists, since it # Strip last refcount output line if it exists, since it
# comes from the shutdown of the interpreter in the subcommand. # comes from the shutdown of the interpreter in the subcommand.

View file

@ -458,6 +458,7 @@ Zbyszek Jędrzejewski-Szmek
Drew Jenkins Drew Jenkins
Flemming Kjær Jensen Flemming Kjær Jensen
MunSic Jeong MunSic Jeong
Chris Jerdonek
Orjan Johansen Orjan Johansen
Fredrik Johansson Fredrik Johansson
Gregory K. Johnson Gregory K. Johnson

View file

@ -341,6 +341,10 @@ Extension Modules
Tests Tests
----- -----
- Issue #15300: Ensure the temporary test working directories are in the same
parent folder when running tests in multiprocess mode from a Python build.
Patch by Chris Jerdonek.
- test_nntplib now tolerates being run from behind NNTP gateways that add - test_nntplib now tolerates being run from behind NNTP gateways that add
"X-Antivirus" headers to articles "X-Antivirus" headers to articles