Skip to content

Commit

Permalink
bpo-30673: test.bat: add -t option (timeout) (#2211) (#2226)
Browse files Browse the repository at this point in the history
(cherry picked from commit 258bfc4)
  • Loading branch information
vstinner committed Jun 15, 2017
1 parent 33cf0c4 commit ab4ea09
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Tools/buildbot/test.bat
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
@echo off
rem Used by the buildbot "test" step.
rem Script to run the Python test suite used by the "test" step
rem of Windows buildbot slaves.
rem
rem See PCbuild/rt.bat for options, extra options:
rem -t TIMEOUT: set a timeout in seconds

setlocal

set here=%~dp0
set rt_opts=-q -d
set regrtest_args=

rem Use a timeout of 60 minutes per test file by default
set timeout=3600

:CheckOpts
if "%1"=="-x64" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
if "%1"=="-d" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
if "%1"=="-O" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
if "%1"=="-q" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
if "%1"=="+d" (set rt_opts=%rt_opts:-d=%) & shift & goto CheckOpts
if "%1"=="+q" (set rt_opts=%rt_opts:-q=%) & shift & goto CheckOpts
if "%1"=="-t" (set timeout=%2) & shift & shift & goto CheckOpts
if NOT "%1"=="" (set regrtest_args=%regrtest_args% %1) & shift & goto CheckOpts

echo on
call "%here%..\..\PCbuild\rt.bat" %rt_opts% -uall -rwW --timeout=3600 %regrtest_args%
call "%here%..\..\PCbuild\rt.bat" %rt_opts% -uall -rwW --timeout=%timeout% %regrtest_args%

0 comments on commit ab4ea09

Please sign in to comment.