Skip to content

Commit d870056

Browse files
authored
Merge pull request #80076 from ahoppen/foundation-tests-debug
[tests] Run swift-(corelibs-)foundation tests in debug configuration on Windows
2 parents aeeeb81 + 3557451 commit d870056

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

utils/build.ps1

+11-3
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ The architecture where the toolchain will execute.
109109
.PARAMETER Variant
110110
The toolchain variant to build. Defaults to `Asserts`.
111111
112+
.PARAMETER FoundationTestConfiguration
113+
Whether to run swift-foundation and swift-corelibs-foundation tests in a debug or release configuration.
114+
112115
.EXAMPLE
113116
PS> .\Build.ps1
114117
@@ -165,6 +168,8 @@ param
165168
[switch] $Clean,
166169
[switch] $DebugInfo,
167170
[switch] $EnableCaching,
171+
[ValidateSet("debug", "release")]
172+
[string] $FoundationTestConfiguration = "debug",
168173
[string] $Cache = "",
169174
[switch] $Summary,
170175
[switch] $ToBatch
@@ -1454,6 +1459,7 @@ function Build-SPMProject {
14541459
[string] $Src,
14551460
[string] $Bin,
14561461
[hashtable] $Arch,
1462+
[string] $Configuration = "release",
14571463
[Parameter(ValueFromRemainingArguments)]
14581464
[string[]] $AdditionalArguments
14591465
)
@@ -1483,7 +1489,7 @@ function Build-SPMProject {
14831489
$Arguments = @(
14841490
"--scratch-path", $Bin,
14851491
"--package-path", $Src,
1486-
"-c", "release",
1492+
"-c", $Configuration,
14871493
"-Xbuild-tools-swiftc", "-I$(Get-SwiftSDK Windows)\usr\lib\swift",
14881494
"-Xbuild-tools-swiftc", "-L$(Get-SwiftSDK Windows)\usr\lib\swift\windows",
14891495
"-Xcc", "-I$(Get-SwiftSDK Windows)\usr\lib\swift",
@@ -2321,7 +2327,8 @@ function Build-Foundation {
23212327
-Action Test `
23222328
-Src $SourceCache\swift-foundation `
23232329
-Bin "$BinaryCache\$($Arch.LLVMTarget)\CoreFoundationTests" `
2324-
-Arch $HostArch
2330+
-Arch $HostArch `
2331+
-Configuration $FoundationTestConfiguration
23252332

23262333
$ShortArch = $Arch.LLVMName
23272334
Invoke-IsolatingEnvVars {
@@ -2335,7 +2342,8 @@ function Build-Foundation {
23352342
-Action Test `
23362343
-Src $SourceCache\swift-corelibs-foundation `
23372344
-Bin "$BinaryCache\$($Arch.LLVMTarget)\FoundationTests" `
2338-
-Arch $HostArch
2345+
-Arch $HostArch `
2346+
-Configuration $FoundationTestConfiguration
23392347
}
23402348
} else {
23412349
$FoundationBinaryCache = if ($Static) {

0 commit comments

Comments
 (0)