diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-09-29 23:39:28 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-09-29 23:39:28 (GMT) |
commit | ecef622fec197f4377b5b5ec58f80f5fd000210f (patch) | |
tree | d0e907554e83437d16d0b623f204d91a428b838c /Lib/test/libregrtest/runtest_mp.py | |
parent | 8bb19f094ba6ba12f70a6458729c911d93c85209 (diff) | |
download | cpython-ecef622fec197f4377b5b5ec58f80f5fd000210f.zip cpython-ecef622fec197f4377b5b5ec58f80f5fd000210f.tar.gz cpython-ecef622fec197f4377b5b5ec58f80f5fd000210f.tar.bz2 |
Issue #25220, libregrtest: Call setup_python(ns) in the slaves
Slaves (child processes running tests for regrtest -jN) now inherit
--memlimit/-M, --threshold/-t and --nowindows/-n options.
* -M, -t and -n are now supported with -jN
* Factorize code to run tests.
* run_test_in_subprocess() now pass the whole "ns" namespace to the child
process.
Diffstat (limited to 'Lib/test/libregrtest/runtest_mp.py')
-rw-r--r-- | Lib/test/libregrtest/runtest_mp.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/libregrtest/runtest_mp.py b/Lib/test/libregrtest/runtest_mp.py index 74424c1..47393aa 100644 --- a/Lib/test/libregrtest/runtest_mp.py +++ b/Lib/test/libregrtest/runtest_mp.py @@ -13,7 +13,8 @@ except ImportError: print("Multiprocess option requires thread support") sys.exit(2) -from test.libregrtest.runtest import runtest, INTERRUPTED, CHILD_ERROR +from test.libregrtest.runtest import runtest_ns, INTERRUPTED, CHILD_ERROR +from test.libregrtest.setup import setup_python # Minimum duration of a test to display its duration or to mention that @@ -58,11 +59,10 @@ def run_tests_slave(slaveargs): ns_dict, testname = json.loads(slaveargs) ns = types.SimpleNamespace(**ns_dict) - if ns.huntrleaks: - unittest.BaseTestSuite._cleanup = False + setup_python(ns) try: - result = runtest_ns(testname, ns.verbose, ns.quiet, ns, + result = runtest_ns(testname, ns.verbose, ns, use_resources=ns.use_resources, output_on_failure=ns.verbose3, failfast=ns.failfast, |