summaryrefslogtreecommitdiffstats
path: root/Lib/test/regrtest.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-07-11 17:19:14 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-07-11 17:19:14 (GMT)
commit282083d5f4f5a0ba02cf0149caec06a6afecdb5e (patch)
tree969b8cb9cacb992161efdcd29e895c56ec33d59f /Lib/test/regrtest.py
parent67097fd592411ac19684f92beafaaa3f1e2f8e6a (diff)
downloadcpython-282083d5f4f5a0ba02cf0149caec06a6afecdb5e.zip
cpython-282083d5f4f5a0ba02cf0149caec06a6afecdb5e.tar.gz
cpython-282083d5f4f5a0ba02cf0149caec06a6afecdb5e.tar.bz2
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.
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-xLib/test/regrtest.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 46c3ac7..a0e08b7 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -572,10 +572,14 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
output.put((None, None, None, None))
return
# -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)],
stdout=PIPE, stderr=PIPE,
universal_newlines=True,
- close_fds=(os.name != 'nt'))
+ close_fds=(os.name != 'nt'),
+ cwd=support.SAVEDCWD)
stdout, stderr = popen.communicate()
# Strip last refcount output line if it exists, since it
# comes from the shutdown of the interpreter in the subcommand.