Skip to content

Commit

Permalink
Fix rt script
Browse files Browse the repository at this point in the history
  • Loading branch information
zooba committed Dec 14, 2023
1 parent 00478ff commit 2a1ef3b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/reusable-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Display build info
run: .\python.bat -m test.pythoninfo
- name: Tests
run: .\PCbuild\rt.bat -p Win32 -d -q --fast-ci
run: .\PCbuild\rt.bat -p Win32 -d -q --fast-ci ${{ inputs.free-threaded && '--disable-gil' || '' }}

build_win_amd64:
name: 'build and test (x64)'
Expand All @@ -37,7 +37,7 @@ jobs:
- name: Display build info
run: .\python.bat -m test.pythoninfo
- name: Tests
run: .\PCbuild\rt.bat -p x64 -d -q --fast-ci
run: .\PCbuild\rt.bat -p x64 -d -q --fast-ci ${{ inputs.free-threaded && '--disable-gil' || '' }}

build_win_arm64:
name: 'build (arm64)'
Expand Down
6 changes: 5 additions & 1 deletion PCbuild/rt.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ rem -q runs the tests just once, and without deleting .pyc files.
rem -p <Win32|x64|ARM|ARM64> or -win32, -x64, -arm32, -arm64
rem Run the specified architecture of python (or python_d if -d
rem was specified). If omitted, uses %PREFIX% if set or 64-bit.
rem --disable-gil Run free-threaded build.
rem All leading instances of these switches are shifted off, and
rem whatever remains (up to 9 arguments) is passed to regrtest.py.
rem For example,
Expand All @@ -29,6 +30,7 @@ rem rt -u "network,largefile"
setlocal

set pcbuild=%~dp0
set pyname=python
set suffix=
set qmode=
set dashO=
Expand All @@ -39,6 +41,8 @@ set exe=
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"=="-arm64" (set prefix=%pcbuild%arm64) & shift & goto CheckOpts
Expand All @@ -47,7 +51,7 @@ 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%\python%suffix%.exe
set exe=%prefix%\%pyname%%suffix%.exe
set cmd="%exe%" %dashO% -m test %regrtestargs%
if defined qmode goto Qmode

Expand Down

0 comments on commit 2a1ef3b

Please sign in to comment.