Skip to content

Enable swift-foundation tests on Windows in toolchain builds #75811

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion utils/build-windows-toolchain.bat
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ set TMPDIR=%BuildRoot%\tmp
set NINJA_STATUS=[%%f/%%t][%%p][%%es]

:: Build the -Test argument, if any, by subtracting skipped tests
set TestArg=-Test swift,dispatch,xctest,
set TestArg=-Test swift,dispatch,foundation,xctest,
for %%I in (%SKIP_TESTS%) do (call set TestArg=%%TestArg:%%I,=%%)
if "%TestArg:~-1%"=="," (set TestArg=%TestArg:~0,-1%) else (set TestArg= )

Expand Down
23 changes: 12 additions & 11 deletions utils/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1651,17 +1651,18 @@ function Build-Foundation([Platform]$Platform, $Arch, [switch]$Test = $false) {
-Arch $HostArch
}

$OutDir = Join-Path -Path $HostArch.BinaryCache -ChildPath foundation-tests

Isolate-EnvVars {
$env:SWIFTCI_USE_LOCAL_DEPS=1
$env:DISPATCH_INCLUDE_PATH="$($Arch.SDKInstallRoot)/usr/lib/swift"
Build-SPMProject `
-Test `
-Src $SourceCache\swift-corelibs-foundation `
-Bin $OutDir `
-Arch $HostArch
}
# swift-corelibs-foundation tests are disabled since the package does not build for Windows yet
# $OutDir = Join-Path -Path $HostArch.BinaryCache -ChildPath foundation-tests

# Isolate-EnvVars {
# $env:SWIFTCI_USE_LOCAL_DEPS=1
# $env:DISPATCH_INCLUDE_PATH="$($Arch.SDKInstallRoot)/usr/lib/swift"
# Build-SPMProject `
# -Test `
# -Src $SourceCache\swift-corelibs-foundation `
# -Bin $OutDir `
# -Arch $HostArch
# }
} else {
$DispatchBinaryCache = Get-TargetProjectBinaryCache $Arch Dispatch
$SwiftSyntaxDir = Get-HostProjectCMakeModules Compilers
Expand Down