summaryrefslogtreecommitdiff
path: root/Lib/test/libregrtest/main.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-09-30 01:39:28 +0200
committerVictor Stinner <victor.stinner@gmail.com>2015-09-30 01:39:28 +0200
commitd3c53bbb5b13c91407d7234f0cda6667a9cf5aa2 (patch)
treef9d1d6366ef0c9dd8acdbdec844d564b2d98ab18 /Lib/test/libregrtest/main.py
parent65a200830f2a737105f0b853a3bcebabcdd8c83a (diff)
downloadcpython-d3c53bbb5b13c91407d7234f0cda6667a9cf5aa2.tar.gz
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/main.py')
-rw-r--r--Lib/test/libregrtest/main.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/libregrtest/main.py b/Lib/test/libregrtest/main.py
index df2329f2d3..e68597038e 100644
--- a/Lib/test/libregrtest/main.py
+++ b/Lib/test/libregrtest/main.py
@@ -354,14 +354,15 @@ class Regrtest:
def main(self, tests=None, **kwargs):
self.ns = self.parse_args(kwargs)
- setup_python(self.ns)
-
if self.ns.slaveargs is not None:
from test.libregrtest.runtest_mp import run_tests_slave
run_tests_slave(self.ns.slaveargs)
+
if self.ns.wait:
input("Press any key to continue...")
+ setup_python(self.ns)
+
self.find_tests(tests)
self.run_tests()