From 3e56c23e7dffceda8e6a729041fbc25347c67320 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 21 Sep 2016 17:12:50 +0200 Subject: regrtest: add -u for unbuffered stdout/stderr --- Lib/test/libregrtest/runtest_mp.py | 2 +- PCbuild/rt.bat | 2 +- Tools/scripts/run_tests.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Lib/test/libregrtest/runtest_mp.py b/Lib/test/libregrtest/runtest_mp.py index 9604c16..74ac4fa 100644 --- a/Lib/test/libregrtest/runtest_mp.py +++ b/Lib/test/libregrtest/runtest_mp.py @@ -41,7 +41,7 @@ def run_test_in_subprocess(testname, ns): slaveargs = json.dumps(slaveargs) cmd = [sys.executable, *support.args_from_interpreter_flags(), - '-X', 'faulthandler', + '-u', # Unbuffered stdout and stderr '-m', 'test.regrtest', '--slaveargs', slaveargs] if ns.pgo: diff --git a/PCbuild/rt.bat b/PCbuild/rt.bat index 7d4d071..bb89f91 100644 --- a/PCbuild/rt.bat +++ b/PCbuild/rt.bat @@ -42,7 +42,7 @@ if "%1"=="-x64" (set prefix=%pcbuild%amd64\) & shift & goto CheckOpts if NOT "%1"=="" (set regrtestargs=%regrtestargs% %1) & shift & goto CheckOpts set exe=%prefix%python%suffix%.exe -set cmd="%exe%" %dashO% -Wd -E -bb -m test %regrtestargs% +set cmd="%exe%" %dashO% -u -Wd -E -bb -m test %regrtestargs% if defined qmode goto Qmode echo Deleting .pyc/.pyo files ... diff --git a/Tools/scripts/run_tests.py b/Tools/scripts/run_tests.py index b582e13..3028302 100644 --- a/Tools/scripts/run_tests.py +++ b/Tools/scripts/run_tests.py @@ -26,6 +26,7 @@ def is_resource_use_flag(arg): def main(regrtest_args): args = [sys.executable, + '-u', # Unbuffered stdout and stderr '-W', 'default', # Warnings set to 'default' '-bb', # Warnings about bytes/bytearray '-E', # Ignore environment variables -- cgit v0.12