Repository navigation
Windows tail-call CI does not run the test cases #131678
Description
Activity
comment from @Fidget-Spinner #131526 (comment)
CI uses cmd instead if powershell, could that make a difference?
comment from @zooba #131526 (comment)
CI uses cmd instead if powershell, could that make a difference?
It probably requires
call PCbuild\build.bat ...to handle someone callingexitin the batch file. In Cmd, if the entire block is a batch file, thenexitwill break out of the top-level one, not the nested one, unless you usecall.Yeah, I remember that pitfall having
exitin a batch file that is not invoked viacall. But then here
cpython/.github/workflows/reusable-windows.yml
Lines 41 to 56 in ce79274
.\\PCbuild\\build.bat -e -d -v -p "${ARCH}" ${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }} shell: bash - name: Display build info # FIXME(diegorusso): remove the `if` if: inputs.arch != 'arm64' run: .\\python.bat -m test.pythoninfo - name: Tests # FIXME(diegorusso): remove the `if` if: inputs.arch != 'arm64' run: >- .\\PCbuild\\rt.bat -p "${ARCH}" -d -q --fast-ci ${{ fromJSON(inputs.free-threading) && '--disable-gil' || '' }} shell: bash
should be affected, too? But as @Fidget-Spinner noted,reusable-windows.ymlusesshell: bashwhereastail-call.ymlusesshell: cmd. And in acmdprompt I definitely get an error for forward slashes.It's still not clear for me, why
./PCbuild/build.batis called called correctly, but as @zooba notes, there are manyexits in it!- addedinfraCI, GitHub Actions, buildbots, Dependabot, etc.CI, GitHub Actions, buildbots, Dependabot, etc.
on Mar 24, 2025 - addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error3.14bugs and security fixesbugs and security fixes
on Mar 24, 2025 Those are separate
run:elements. Each one of those is likely implemented by writing the contents ofrun:intorandomly_named.batand doingcmd /C .\randomly_named.bat, which then means any further batch files are nested within it. But becausebuild.batis the last one that runs, you don't notice if it exits all the way.In the other file, there are two batch files in the same
run:step, so you do notice if one exits the whole step early.Reacted by Chris EiblKudos to @zooba: prepending
callfixes the issue: https://github.com/python/cpython/actions/runs/14044831663/job/39323183797?pr=131690
And reveals #131691, which I haven't noticed so far, because I only ran the full test suite for release or PGO builds ...Reacted by Steve DowerThanks!
Reacted by Chris Eibl
Excerpts from here #131526 (comment):
See e.g. https://github.com/python/cpython/actions/runs/14006628024/job/39221297660 and https://github.com/python/cpython/actions/runs/13954576580/job/39062383429#step:4:326.
After building, no more output can be seen.
This is interesting, because
cpython/.github/workflows/tail-call.yml
Lines 82 to 91 in ce79274
clearly
./PCbuild/rt.batis invoked. Maybe the reason is, because it is not used with backslashes like incpython/.github/workflows/reusable-windows.yml
Line 52 in ce79274
The question then is, why
./PCbuild/build.batis working ...Linked PRs