summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-05-18 16:33:07 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-05-18 16:33:07 (GMT)
commitebdcd859e59ed16a79dea94291c0be3a87640a08 (patch)
tree4f91f5ec40375ba9bbdfacc2da79dd31bc440f89 /Tools
parent77c84f2defb0013e28d262be237142379a1407fe (diff)
downloadcpython-ebdcd859e59ed16a79dea94291c0be3a87640a08.zip
cpython-ebdcd859e59ed16a79dea94291c0be3a87640a08.tar.gz
cpython-ebdcd859e59ed16a79dea94291c0be3a87640a08.tar.bz2
Move private function _args_from_interpreter_flags() to subprocess.py, so
that it can be imported when threads are disabled. (followup to issue #12098)
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/scripts/run_tests.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Tools/scripts/run_tests.py b/Tools/scripts/run_tests.py
index f750e19..e2a2050 100755
--- a/Tools/scripts/run_tests.py
+++ b/Tools/scripts/run_tests.py
@@ -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'])