@@ -2283,25 +2283,31 @@ function Write-SDKSettingsPlist([Platform]$Platform, $Arch) {
22832283 $SDKSettings | ConvertTo-JSON | Out-FIle - FilePath " $ ( Get-SwiftSDK $Platform ) \SDKSettings.json"
22842284}
22852285
2286- function Build-Dispatch ([Platform ]$Platform , $Arch , [switch ]$Test = $false ) {
2287- Invoke-IsolatingEnvVars {
2288- if ($Test ) {
2289- $Targets = @ (" default" , " ExperimentalTest" )
2290- $InstallPath = " "
2291- $env: CTEST_OUTPUT_ON_FAILURE = " YES"
2292- } else {
2293- $Targets = @ (" install" )
2294- $InstallPath = " $ ( Get-SwiftSDK $Platform ) \usr"
2286+ function Build-Dispatch ([Platform ]$Platform , $Arch ) {
2287+ Build-CMakeProject `
2288+ - Src $SourceCache \swift- corelibs- libdispatch `
2289+ - Bin (Get-ProjectBinaryCache $Arch Dispatch) `
2290+ - InstallTo " $ ( Get-SwiftSDK $Platform ) \usr" `
2291+ - Arch $Arch `
2292+ - Platform $Platform `
2293+ - SwiftSDK (Get-SwiftSDK $Platform ) `
2294+ - UseBuiltCompilers C, CXX, Swift `
2295+ - Defines @ {
2296+ ENABLE_SWIFT = " YES" ;
22952297 }
2298+ }
2299+
2300+ function Test-Dispatch {
2301+ Invoke-IsolatingEnvVars {
2302+ $env: CTEST_OUTPUT_ON_FAILURE = " YES"
22962303
22972304 Build-CMakeProject `
22982305 - Src $SourceCache \swift- corelibs- libdispatch `
2299- - Bin (Get-ProjectBinaryCache $Arch Dispatch) `
2300- - InstallTo $InstallPath `
2301- - Arch $Arch `
2302- - Platform $Platform `
2303- - BuildTargets $Targets `
2304- - SwiftSDK (Get-SwiftSDK $Platform ) `
2306+ - Bin (Get-ProjectBinaryCache $BuildArch Dispatch) `
2307+ - Arch $BuildArch `
2308+ - Platform Windows `
2309+ - SwiftSDK (Get-SwiftSDK Windows) `
2310+ - BuildTargets default , ExperimentalTest `
23052311 - UseBuiltCompilers C, CXX, Swift `
23062312 - Defines @ {
23072313 ENABLE_SWIFT = " YES" ;
@@ -3287,9 +3293,7 @@ if (-not $IsCrossCompiling) {
32873293 Build-Compilers $HostArch @Tests
32883294 }
32893295
3290- if ($Test -contains " dispatch" ) {
3291- Build-Dispatch Windows $HostArch - Test
3292- }
3296+ if ($Test -contains " dispatch" ) { Test-Dispatch }
32933297 if ($Test -contains " foundation" ) { Test-Foundation }
32943298 if ($Test -contains " xctest" ) { Test-XCTest }
32953299 if ($Test -contains " testing" ) { Test-Testing }
0 commit comments