@@ -2283,25 +2283,31 @@ function Write-SDKSettingsPlist([Platform]$Platform, $Arch) {
2283
2283
$SDKSettings | ConvertTo-JSON | Out-FIle - FilePath " $ ( Get-SwiftSDK $Platform ) \SDKSettings.json"
2284
2284
}
2285
2285
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" ;
2295
2297
}
2298
+ }
2299
+
2300
+ function Test-Dispatch {
2301
+ Invoke-IsolatingEnvVars {
2302
+ $env: CTEST_OUTPUT_ON_FAILURE = " YES"
2296
2303
2297
2304
Build-CMakeProject `
2298
2305
- 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 `
2305
2311
- UseBuiltCompilers C, CXX, Swift `
2306
2312
- Defines @ {
2307
2313
ENABLE_SWIFT = " YES" ;
@@ -3287,9 +3293,7 @@ if (-not $IsCrossCompiling) {
3287
3293
Build-Compilers $HostArch @Tests
3288
3294
}
3289
3295
3290
- if ($Test -contains " dispatch" ) {
3291
- Build-Dispatch Windows $HostArch - Test
3292
- }
3296
+ if ($Test -contains " dispatch" ) { Test-Dispatch }
3293
3297
if ($Test -contains " foundation" ) { Test-Foundation }
3294
3298
if ($Test -contains " xctest" ) { Test-XCTest }
3295
3299
if ($Test -contains " testing" ) { Test-Testing }
0 commit comments