summaryrefslogtreecommitdiffstats
path: root/Lib/test/regrtest.py
diff options
context:
space:
mode:
authorNadeem Vawda <nadeem.vawda@gmail.com>2011-08-01 21:48:26 (GMT)
committerNadeem Vawda <nadeem.vawda@gmail.com>2011-08-01 21:48:26 (GMT)
commit3c01d16ed91fa77a8e70d9fa3a6c33d6290fd9c4 (patch)
tree520df41802673ee06ad4248af69c9cb7b5ab0d65 /Lib/test/regrtest.py
parentb0fa4b843324ddebce03f13aa27021ed3d03332d (diff)
downloadcpython-3c01d16ed91fa77a8e70d9fa3a6c33d6290fd9c4.zip
cpython-3c01d16ed91fa77a8e70d9fa3a6c33d6290fd9c4.tar.gz
cpython-3c01d16ed91fa77a8e70d9fa3a6c33d6290fd9c4.tar.bz2
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.
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-xLib/test/regrtest.py7
1 files changed, 7 insertions, 0 deletions
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 @@ resources to test. Currently only the following are defined:
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 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
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 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
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':