Skip to content

Commit cc16488

Browse files
[windows][toolchain] Dump test output on failure when testing libdispatch (swiftlang#79079)
Dumps output for test cases that failed or timed out
1 parent 11804d9 commit cc16488

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

utils/build.ps1

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2068,25 +2068,28 @@ function Write-SDKSettingsPlist([Platform]$Platform, $Arch) {
20682068
}
20692069

20702070
function Build-Dispatch([Platform]$Platform, $Arch, [switch]$Test = $false) {
2071-
if ($Test) {
2072-
$Targets = @("default", "ExperimentalTest")
2073-
$InstallPath = ""
2074-
} else {
2075-
$Targets = @("install")
2076-
$InstallPath = "$($Arch.SDKInstallRoot)\usr"
2077-
}
2078-
2079-
Build-CMakeProject `
2080-
-Src $SourceCache\swift-corelibs-libdispatch `
2081-
-Bin (Get-TargetProjectBinaryCache $Arch Dispatch) `
2082-
-InstallTo $InstallPath `
2083-
-Arch $Arch `
2084-
-Platform $Platform `
2085-
-BuildTargets $Targets `
2086-
-UseBuiltCompilers C,CXX,Swift `
2087-
-Defines @{
2088-
ENABLE_SWIFT = "YES";
2071+
Isolate-EnvVars {
2072+
if ($Test) {
2073+
$Targets = @("default", "ExperimentalTest")
2074+
$InstallPath = ""
2075+
$env:CTEST_OUTPUT_ON_FAILURE = "YES"
2076+
} else {
2077+
$Targets = @("install")
2078+
$InstallPath = "$($Arch.SDKInstallRoot)\usr"
20892079
}
2080+
2081+
Build-CMakeProject `
2082+
-Src $SourceCache\swift-corelibs-libdispatch `
2083+
-Bin (Get-TargetProjectBinaryCache $Arch Dispatch) `
2084+
-InstallTo $InstallPath `
2085+
-Arch $Arch `
2086+
-Platform $Platform `
2087+
-BuildTargets $Targets `
2088+
-UseBuiltCompilers C,CXX,Swift `
2089+
-Defines @{
2090+
ENABLE_SWIFT = "YES";
2091+
}
2092+
}
20902093
}
20912094

20922095
function Build-Foundation([Platform]$Platform, $Arch, [switch]$Test = $false) {

0 commit comments

Comments
 (0)