summaryrefslogtreecommitdiffstats
path: root/Lib/test/regrtest.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-10-14 11:12:00 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-10-14 11:12:00 (GMT)
commit1b03f2ca83d6232845c2dadf47c2e15b32c1d906 (patch)
tree91c6df7fdce2e33a6d8fc33461d5dbeb16737f71 /Lib/test/regrtest.py
parent9a6692f6d7784365ae07094694c754d2b153b719 (diff)
downloadcpython-1b03f2ca83d6232845c2dadf47c2e15b32c1d906.zip
cpython-1b03f2ca83d6232845c2dadf47c2e15b32c1d906.tar.gz
cpython-1b03f2ca83d6232845c2dadf47c2e15b32c1d906.tar.bz2
Inherit interpreter flags in parallel testing
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-xLib/test/regrtest.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 55c73e2..64d0a7c 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -391,9 +391,6 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
usage("-T and -j don't go together!")
if use_mp and findleaks:
usage("-l and -j don't go together!")
- if use_mp and max(sys.flags):
- # TODO: inherit the environment and the flags
- print("Warning: flags and environment variables are ignored with -j option")
good = []
bad = []
@@ -534,6 +531,8 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
)
yield (test, args_tuple)
pending = tests_and_args()
+ opt_args = support.args_from_interpreter_flags()
+ base_cmd = [sys.executable] + opt_args + ['-m', 'test.regrtest']
def work():
# A worker thread.
try:
@@ -544,8 +543,7 @@ 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
- popen = Popen([sys.executable, '-E', '-m', 'test.regrtest',
- '--slaveargs', json.dumps(args_tuple)],
+ popen = Popen(base_cmd + ['--slaveargs', json.dumps(args_tuple)],
stdout=PIPE, stderr=PIPE,
universal_newlines=True,
close_fds=(os.name != 'nt'))