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.
diff --git a/Lib/test/libregrtest/main.py b/Lib/test/libregrtest/main.py
index df2329f..e685970 100644
--- a/Lib/test/libregrtest/main.py
+++ b/Lib/test/libregrtest/main.py
@@ -354,14 +354,15 @@
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()