From 383a820e0dd05273940c9513be7ee17d912aa54f Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 25 Jun 2013 21:24:36 +0200 Subject: Issue #17206: test.regrtest and test.script_helper enable faulthandler module in subprocesses. --- Lib/test/regrtest.py | 3 ++- Lib/test/script_helper.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 028f3b4..e6eef16 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -701,7 +701,8 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, output = Queue() pending = MultiprocessTests(tests) opt_args = support.args_from_interpreter_flags() - base_cmd = [sys.executable] + opt_args + ['-m', 'test.regrtest'] + base_cmd = [sys.executable] + opt_args + base_cmd += ['-X', 'faulthandler', '-m', 'test.regrtest'] def work(): # A worker thread. try: diff --git a/Lib/test/script_helper.py b/Lib/test/script_helper.py index 3b7df42..3c6430b 100644 --- a/Lib/test/script_helper.py +++ b/Lib/test/script_helper.py @@ -17,7 +17,7 @@ from test.support import make_legacy_pyc, strip_python_stderr # Executing the interpreter in a subprocess def _assert_python(expected_success, *args, **env_vars): - cmd_line = [sys.executable] + cmd_line = [sys.executable, '-X', 'faulthandler'] if not env_vars: cmd_line.append('-E') # Need to preserve the original environment, for in-place testing of -- cgit v0.12