[windows] improve SKIP_TESTS substitution

This commit is contained in:
Charles Zablit
2025-11-20 12:49:22 +01:00
parent 7ce79f2cdf
commit 1c62638e9e

View File

@@ -62,9 +62,15 @@ set TMPDIR=%BuildRoot%\tmp
set NINJA_STATUS=[%%f/%%t][%%p][%%es]
:: Build the -Test argument, if any, by subtracting skipped tests
set TestArg=-Test lld,lldb,lldb-swift,swift,dispatch,foundation,xctest,swift-format,sourcekit-lsp,
for %%I in (%SKIP_TESTS%) do (call set TestArg=%%TestArg:%%I,=%%)
if "%TestArg:~-1%"=="," (set TestArg=%TestArg:~0,-1%) else (set TestArg= )
set TestsList=lld,lldb,lldb-swift,swift,dispatch,foundation,xctest,swift-format,sourcekit-lsp
set "TestArg="
set "Skip=,%SKIP_TESTS%,"
for %%I in (%TestsList%) do (
if "!Skip:,%%I,=!" == "!Skip!" (
set "TestArg=!TestArg!%%I,"
)
)
set "TestArg=-Test !TestArg!"
:: Build the packaging arguments (skipped for normal PRs and an added stage for toolchain PRs)
set "PackagingArg=-SkipPackaging"