mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Move private function _args_from_interpreter_flags() to subprocess.py, so
that it can be imported when threads are disabled. (followup to issue #12098)
This commit is contained in:
parent
77c84f2def
commit
ebdcd859e5
4 changed files with 38 additions and 32 deletions
|
@ -10,6 +10,10 @@ simply passing a -u option to this script.
|
|||
import os
|
||||
import sys
|
||||
import test.support
|
||||
try:
|
||||
import threading
|
||||
except ImportError:
|
||||
threading = None
|
||||
|
||||
|
||||
def is_multiprocess_flag(arg):
|
||||
|
@ -34,7 +38,7 @@ def main(regrtest_args):
|
|||
])
|
||||
if sys.platform == 'win32':
|
||||
args.append('-n') # Silence alerts under Windows
|
||||
if not any(is_multiprocess_flag(arg) for arg in regrtest_args):
|
||||
if threading and not any(is_multiprocess_flag(arg) for arg in regrtest_args):
|
||||
args.extend(['-j', '0']) # Use all CPU cores
|
||||
if not any(is_resource_use_flag(arg) for arg in regrtest_args):
|
||||
args.extend(['-u', 'all,-largefile,-audio,-gui'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue