regrtest: add -u for unbuffered stdout/stderr

This commit is contained in:
Victor Stinner 2016-09-21 17:12:50 +02:00
parent 78c13021db
commit 3e56c23e7d
3 changed files with 3 additions and 2 deletions

View File

@ -41,7 +41,7 @@ def run_test_in_subprocess(testname, ns):
slaveargs = json.dumps(slaveargs) slaveargs = json.dumps(slaveargs)
cmd = [sys.executable, *support.args_from_interpreter_flags(), cmd = [sys.executable, *support.args_from_interpreter_flags(),
'-X', 'faulthandler', '-u', # Unbuffered stdout and stderr
'-m', 'test.regrtest', '-m', 'test.regrtest',
'--slaveargs', slaveargs] '--slaveargs', slaveargs]
if ns.pgo: if ns.pgo:

View File

@ -42,7 +42,7 @@ if "%1"=="-x64" (set prefix=%pcbuild%amd64\) & shift & goto CheckOpts
if NOT "%1"=="" (set regrtestargs=%regrtestargs% %1) & shift & goto CheckOpts if NOT "%1"=="" (set regrtestargs=%regrtestargs% %1) & shift & goto CheckOpts
set exe=%prefix%python%suffix%.exe 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 if defined qmode goto Qmode
echo Deleting .pyc/.pyo files ... echo Deleting .pyc/.pyo files ...

View File

@ -26,6 +26,7 @@ def is_resource_use_flag(arg):
def main(regrtest_args): def main(regrtest_args):
args = [sys.executable, args = [sys.executable,
'-u', # Unbuffered stdout and stderr
'-W', 'default', # Warnings set to 'default' '-W', 'default', # Warnings set to 'default'
'-bb', # Warnings about bytes/bytearray '-bb', # Warnings about bytes/bytearray
'-E', # Ignore environment variables '-E', # Ignore environment variables