Skip to content

Commit ab4ea09

Browse files
authored
bpo-30673: test.bat: add -t option (timeout) (#2211) (#2226)
(cherry picked from commit 258bfc4)
1 parent 33cf0c4 commit ab4ea09

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Tools/buildbot/test.bat

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
11
@echo off
2-
rem Used by the buildbot "test" step.
2+
rem Script to run the Python test suite used by the "test" step
3+
rem of Windows buildbot slaves.
4+
rem
5+
rem See PCbuild/rt.bat for options, extra options:
6+
rem -t TIMEOUT: set a timeout in seconds
7+
38
setlocal
49

510
set here=%~dp0
611
set rt_opts=-q -d
712
set regrtest_args=
813

14+
rem Use a timeout of 60 minutes per test file by default
15+
set timeout=3600
16+
917
:CheckOpts
1018
if "%1"=="-x64" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
1119
if "%1"=="-d" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
1220
if "%1"=="-O" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
1321
if "%1"=="-q" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
1422
if "%1"=="+d" (set rt_opts=%rt_opts:-d=%) & shift & goto CheckOpts
1523
if "%1"=="+q" (set rt_opts=%rt_opts:-q=%) & shift & goto CheckOpts
24+
if "%1"=="-t" (set timeout=%2) & shift & shift & goto CheckOpts
1625
if NOT "%1"=="" (set regrtest_args=%regrtest_args% %1) & shift & goto CheckOpts
1726

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

0 commit comments

Comments
 (0)