Issue #11651: Move options for running tests into a Python script.
This will be particularly useful to Windows users.
run_tests.py originally written by Brett Cannon.
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index ef8ea6d..77c089c 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -133,6 +133,8 @@
all - Enable all special resources.
+ none - Disable all special resources (this is the default).
+
audio - Tests that use the audio device. (There are known
cases of broken audio drivers that can crash Python or
even the Linux kernel.)
@@ -387,6 +389,9 @@
if r == 'all':
use_resources[:] = RESOURCE_NAMES
continue
+ if r == 'none':
+ del use_resources[:]
+ continue
remove = False
if r[0] == '-':
remove = True
@@ -424,6 +429,8 @@
use_mp = 2 + multiprocessing.cpu_count()
except (ImportError, NotImplementedError):
use_mp = 3
+ if use_mp == 1:
+ use_mp = None
elif o == '--header':
header = True
elif o == '--slaveargs':