@@ -2317,24 +2317,29 @@ function Write-SDKSettingsPlist([Platform]$Platform, $Arch) {
2317
2317
$SDKSettings | ConvertTo-JSON | Out-FIle - FilePath " $ ( Get-SwiftSDK $Platform ) \SDKSettings.json"
2318
2318
}
2319
2319
2320
- function Build-Dispatch ([Platform ]$Platform , $Arch , [switch ]$Test = $false ) {
2321
- Invoke-IsolatingEnvVars {
2322
- if ($Test ) {
2323
- $Targets = @ (" default" , " ExperimentalTest" )
2324
- $InstallPath = " "
2325
- $env: CTEST_OUTPUT_ON_FAILURE = " YES"
2326
- } else {
2327
- $Targets = @ (" install" )
2328
- $InstallPath = " $ ( Get-SwiftSDK $Platform ) \usr"
2320
+ function Build-Dispatch ([Platform ]$Platform , $Arch ) {
2321
+ Build-CMakeProject `
2322
+ - Src $SourceCache \swift- corelibs- libdispatch `
2323
+ - Bin (Get-TargetProjectBinaryCache $Arch Dispatch) `
2324
+ - InstallTo " $ ( Get-SwiftSDK $Platform ) \usr" `
2325
+ - Arch $Arch `
2326
+ - Platform $Platform `
2327
+ - UseBuiltCompilers C, CXX, Swift `
2328
+ - Defines @ {
2329
+ ENABLE_SWIFT = " YES" ;
2329
2330
}
2331
+ }
2332
+
2333
+ function Test-Dispatch {
2334
+ Invoke-IsolatingEnvVars {
2335
+ $env: CTEST_OUTPUT_ON_FAILURE = " YES"
2330
2336
2331
2337
Build-CMakeProject `
2332
2338
- Src $SourceCache \swift- corelibs- libdispatch `
2333
2339
- Bin (Get-TargetProjectBinaryCache $Arch Dispatch) `
2334
- - InstallTo $InstallPath `
2335
2340
- Arch $Arch `
2336
2341
- Platform $Platform `
2337
- - BuildTargets $Targets `
2342
+ - BuildTargets default , ExperimentalTest `
2338
2343
- UseBuiltCompilers C, CXX, Swift `
2339
2344
- Defines @ {
2340
2345
ENABLE_SWIFT = " YES" ;
@@ -3380,9 +3385,7 @@ if (-not $IsCrossCompiling) {
3380
3385
Build-Compilers $HostArch @Tests
3381
3386
}
3382
3387
3383
- if ($Test -contains " dispatch" ) {
3384
- Build-Dispatch Windows $HostArch - Test
3385
- }
3388
+ if ($Test -contains " dispatch" ) { Test-Dispatch }
3386
3389
if ($Test -contains " foundation" ) { Test-Foundation }
3387
3390
if ($Test -contains " xctest" ) { Test-XCTest }
3388
3391
if ($Test -contains " testing" ) { Test-Testing }
0 commit comments