]> granicus.if.org Git - python/commitdiff
Issue #15300: Ensure the temporary test working directories are in the same parent...
authorAntoine Pitrou <solipsis@pitrou.net>
Wed, 11 Jul 2012 17:19:14 +0000 (19:19 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Wed, 11 Jul 2012 17:19:14 +0000 (19:19 +0200)
Patch by Chris Jerdonek.

Lib/test/regrtest.py
Misc/ACKS
Misc/NEWS

index 46c3ac79dfafed5e19af9c74362389f43b0cfcea..a0e08b77d9c91ca69a57eabd7dc421c9fe6be33f 100755 (executable)
@@ -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.
index efa7339e2b3e7c1f67caa25194bc4da15e7d4912..8e377182b014e8ac10706872411c4b44ce4731a2 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -458,6 +458,7 @@ Zbyszek Jędrzejewski-Szmek
 Drew Jenkins
 Flemming Kjær Jensen
 MunSic Jeong
+Chris Jerdonek
 Orjan Johansen
 Fredrik Johansson
 Gregory K. Johnson
index fe838975535098d1a769eecefb0374b6d922432e..34a34c0aea2edc5df5145fb1a7f32253fb1a7c91 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -341,6 +341,10 @@ Extension Modules
 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
   "X-Antivirus" headers to articles