Skip to content

Commit ab57ef9

Browse files
authored
Merge pull request #73586 from readdle/dont-install-testable
utils: do not install testable corelibs builds
2 parents 477f37f + 4222205 commit ab57ef9

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

utils/build.ps1

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,12 +1391,18 @@ function Build-Runtime([Platform]$Platform, $Arch) {
13911391
}
13921392

13931393
function Build-Dispatch([Platform]$Platform, $Arch, [switch]$Test = $false) {
1394-
$Targets = if ($Test) { @("default", "ExperimentalTest") } else { @("default", "install") }
1394+
if ($Test) {
1395+
$Targets = @("default", "ExperimentalTest")
1396+
$InstallPath = ""
1397+
} else {
1398+
$Targets = @("default", "install")
1399+
$InstallPath = "$($Arch.SDKInstallRoot)\usr"
1400+
}
13951401

13961402
Build-CMakeProject `
13971403
-Src $SourceCache\swift-corelibs-libdispatch `
13981404
-Bin (Get-TargetProjectBinaryCache $Arch Dispatch) `
1399-
-InstallTo "$($Arch.SDKInstallRoot)\usr" `
1405+
-InstallTo $InstallPath `
14001406
-Arch $Arch `
14011407
-Platform $Platform `
14021408
-UseBuiltCompilers C,CXX,Swift `
@@ -1420,16 +1426,18 @@ function Build-Foundation([Platform]$Platform, $Arch, [switch]$Test = $false) {
14201426
}
14211427
$Targets = @("default", "test")
14221428
$env:Path = "$XCTestBinaryCache;$FoundationBinaryCache\bin;$DispatchBinaryCache;$(Get-TargetProjectBinaryCache $Arch Runtime)\bin;$env:Path"
1429+
$InstallPath = ""
14231430
} else {
14241431
$TestingDefines = @{ ENABLE_TESTING = "NO" }
14251432
$Targets = @("default", "install")
1433+
$InstallPath = "$($Arch.SDKInstallRoot)\usr"
14261434
}
14271435

14281436
$env:CTEST_OUTPUT_ON_FAILURE = 1
14291437
Build-CMakeProject `
14301438
-Src $SourceCache\swift-corelibs-foundation `
14311439
-Bin $FoundationBinaryCache `
1432-
-InstallTo "$($Arch.SDKInstallRoot)\usr" `
1440+
-InstallTo $InstallPath `
14331441
-Arch $Arch `
14341442
-Platform $Platform `
14351443
-UseBuiltCompilers ASM,C,Swift `
@@ -1469,16 +1477,18 @@ function Build-XCTest([Platform]$Platform, $Arch, [switch]$Test = $false) {
14691477
XCTEST_PATH_TO_FOUNDATION_BUILD = $FoundationBinaryCache;
14701478
}
14711479
$Targets = @("default", "check-xctest")
1480+
$InstallPath = ""
14721481
$env:Path = "$XCTestBinaryCache;$FoundationBinaryCache\bin;$DispatchBinaryCache;$(Get-TargetProjectBinaryCache $Arch Runtime)\bin;$env:Path;$UnixToolsBinDir"
14731482
} else {
14741483
$TestingDefines = @{ ENABLE_TESTING = "NO" }
14751484
$Targets = @("default", "install")
1485+
$InstallPath = "$($Arch.XCTestInstallRoot)\usr"
14761486
}
14771487

14781488
Build-CMakeProject `
14791489
-Src $SourceCache\swift-corelibs-xctest `
14801490
-Bin $XCTestBinaryCache `
1481-
-InstallTo "$($Arch.XCTestInstallRoot)\usr" `
1491+
-InstallTo $InstallPath `
14821492
-Arch $Arch `
14831493
-Platform $Platform `
14841494
-UseBuiltCompilers Swift `

0 commit comments

Comments
 (0)