mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
gh-115556: Remove quotes from command-line arguments in test.bat and rt.bat (#115557)
This change essentially replaces usage of `%1` with `%~1`, which removes quotes, if any. Without this change, the if statements fail due to the quotes mangling the syntax. Additionally, this change works around comma being treated as a parameter delimiter in test.bat by escaping commas at time of parsing. Tested combinations of rt and regrtest arguments, all seems to work as before but now you can specify commas in arguments like "-uall,extralargefile".
This commit is contained in:
parent
74e6f4b32f
commit
711f42de2e
3 changed files with 29 additions and 21 deletions
|
|
@ -38,18 +38,18 @@ set regrtestargs=--fast-ci
|
|||
set exe=
|
||||
|
||||
:CheckOpts
|
||||
if "%1"=="-O" (set dashO=-O) & shift & goto CheckOpts
|
||||
if "%1"=="-q" (set qmode=yes) & shift & goto CheckOpts
|
||||
if "%1"=="-d" (set suffix=_d) & shift & goto CheckOpts
|
||||
if "%~1"=="-O" (set dashO=-O) & shift & goto CheckOpts
|
||||
if "%~1"=="-q" (set qmode=yes) & shift & goto CheckOpts
|
||||
if "%~1"=="-d" (set suffix=_d) & shift & goto CheckOpts
|
||||
rem HACK: Need some way to infer the version number in this script
|
||||
if "%1"=="--disable-gil" (set pyname=python3.13t) & shift & goto CheckOpts
|
||||
if "%1"=="-win32" (set prefix=%pcbuild%win32) & shift & goto CheckOpts
|
||||
if "%1"=="-x64" (set prefix=%pcbuild%amd64) & shift & goto CheckOpts
|
||||
if "%1"=="-amd64" (set prefix=%pcbuild%amd64) & shift & goto CheckOpts
|
||||
if "%1"=="-arm64" (set prefix=%pcbuild%arm64) & shift & goto CheckOpts
|
||||
if "%1"=="-arm32" (set prefix=%pcbuild%arm32) & shift & goto CheckOpts
|
||||
if "%1"=="-p" (call :SetPlatform %~2) & shift & shift & goto CheckOpts
|
||||
if NOT "%1"=="" (set regrtestargs=%regrtestargs% %1) & shift & goto CheckOpts
|
||||
if "%~1"=="--disable-gil" (set pyname=python3.13t) & shift & goto CheckOpts
|
||||
if "%~1"=="-win32" (set prefix=%pcbuild%win32) & shift & goto CheckOpts
|
||||
if "%~1"=="-x64" (set prefix=%pcbuild%amd64) & shift & goto CheckOpts
|
||||
if "%~1"=="-amd64" (set prefix=%pcbuild%amd64) & shift & goto CheckOpts
|
||||
if "%~1"=="-arm64" (set prefix=%pcbuild%arm64) & shift & goto CheckOpts
|
||||
if "%~1"=="-arm32" (set prefix=%pcbuild%arm32) & shift & goto CheckOpts
|
||||
if "%~1"=="-p" (call :SetPlatform %~2) & shift & shift & goto CheckOpts
|
||||
if NOT "%~1"=="" (set regrtestargs=%regrtestargs% %~1) & shift & goto CheckOpts
|
||||
|
||||
if not defined prefix set prefix=%pcbuild%amd64
|
||||
set exe=%prefix%\%pyname%%suffix%.exe
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue