Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e74fe18

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

3 files changed

Lines changed: 24 additions & 12 deletions

File tree

Misc/NEWS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ Documentation
5656
- Issue #22812: Fix unittest discovery examples.
5757
Patch from Pam McA'Nulty.
5858

59+
Tests
60+
-----
61+
62+
- PCbuild\rt.bat now accepts an unlimited number of arguments to pass along
63+
to regrtest.py. Previously there was a limit of 9.
64+
5965

6066
What's New in Python 3.5.0 release candidate 3?
6167
===============================================

PCbuild/rt.bat

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,17 @@ set prefix=%pcbuild%win32\
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

4244
set exe=%prefix%python%suffix%.exe
43-
set cmd="%exe%" %dashO% -Wd -E -bb "%pcbuild%..\lib\test\regrtest.py" %1 %2 %3 %4 %5 %6 %7 %8 %9
45+
set cmd="%exe%" %dashO% -Wd -E -bb "%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 -n --timeout=3600 %1 %2 %3 %4 %5 %6 %7 %8 %9
18+
echo on
19+
call "%here%..\..\PCbuild\rt.bat" %rt_opts% -uall -rwW -n --timeout=3600 %regrtest_args%

0 commit comments

Comments
 (0)