Skip to content

Commit 7ab6cb4

Browse files
committed
Allow PCbuild\rt.bat to accept unlimited arguments for regrtest.
This makes it possible to pass more than 7 tests by name through Tools\buildbot\test.bat
1 parent c97e18e commit 7ab6cb4

3 files changed

Lines changed: 22 additions & 13 deletions

File tree

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@ Tests
180180
a test run is no longer marked as a failure if all tests succeed when
181181
re-run.
182182

183+
- PCbuild\rt.bat now accepts an unlimited number of arguments to pass along
184+
to regrtest.py. Previously there was a limit of 9.
185+
183186

184187
What's New in Python 2.7.10?
185188
============================

PCbuild/rt.bat

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,17 @@ set prefix=%pcbuild%
3232
set suffix=
3333
set qmode=
3434
set dashO=
35+
set regrtestargs=
3536

3637
:CheckOpts
3738
if "%1"=="-O" (set dashO=-O) & shift & goto CheckOpts
3839
if "%1"=="-q" (set qmode=yes) & shift & goto CheckOpts
3940
if "%1"=="-d" (set suffix=_d) & shift & goto CheckOpts
4041
if "%1"=="-x64" (set prefix=%pcbuild%amd64\) & shift & goto CheckOpts
42+
if NOT "%1"=="" (set regrtestargs=%regrtestargs% %1) & shift & goto CheckOpts
4143

42-
set exe=%prefix%\python%suffix%
43-
set cmd="%exe%" %dashO% -Wd -3 -E -tt "%pcbuild%..\Lib\test\regrtest.py" %1 %2 %3 %4 %5 %6 %7 %8 %9
44+
set exe=%prefix%python%suffix%
45+
set cmd="%exe%" %dashO% -Wd -3 -E -tt "%pcbuild%..\Lib\test\regrtest.py" %regrtestargs%
4446
if defined qmode goto Qmode
4547

4648
echo Deleting .pyc/.pyo files ...

Tools/buildbot/test.bat

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
@rem Used by the buildbot "test" step.
2-
@setlocal
1+
@echo off
2+
rem Used by the buildbot "test" step.
3+
setlocal
34

4-
@set here=%~dp0
5-
@set rt_opts=-q -d
5+
set here=%~dp0
6+
set rt_opts=-q -d
7+
set regrtest_args=
68

79
:CheckOpts
8-
@if '%1'=='-x64' (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
9-
@if '%1'=='-d' (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
10-
@if '%1'=='-O' (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
11-
@if '%1'=='-q' (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
12-
@if '%1'=='+d' (set rt_opts=%rt_opts:-d=%) & shift & goto CheckOpts
13-
@if '%1'=='+q' (set rt_opts=%rt_opts:-q=%) & shift & goto CheckOpts
10+
if "%1"=="-x64" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
11+
if "%1"=="-d" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
12+
if "%1"=="-O" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
13+
if "%1"=="-q" (set rt_opts=%rt_opts% %1) & shift & goto CheckOpts
14+
if "%1"=="+d" (set rt_opts=%rt_opts:-d=%) & shift & goto CheckOpts
15+
if "%1"=="+q" (set rt_opts=%rt_opts:-q=%) & shift & goto CheckOpts
16+
if NOT "%1"=="" (set regrtest_args=%regrtest_args% %1) & shift & goto CheckOpts
1417

15-
call "%here%..\..\PCbuild\rt.bat" %rt_opts% -uall -rwW %1 %2 %3 %4 %5 %6 %7 %8 %9
18+
echo on
19+
call "%here%..\..\PCbuild\rt.bat" %rt_opts% -uall -rwW %regrtest_args%

0 commit comments

Comments
 (0)