Skip to content

Commit 5e5b70e

Browse files
[windows] only test the Swift subset of LLDB tests in CI
1 parent 46ce02b commit 5e5b70e

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

utils/build.ps1

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Skip building the MSI installers and packaging. Useful for development builds.
120120
121121
.PARAMETER Test
122122
An array of names of projects to run tests for. Use '*' to run all tests.
123-
Available tests: lld, lldb, swift, dispatch, foundation, xctest, swift-format, sourcekit-lsp
123+
Available tests: lld, lldb, lldb-swift, swift, dispatch, foundation, xctest, swift-format, sourcekit-lsp
124124
125125
.PARAMETER IncludeDS2
126126
Include the ds2 remote debug server in the SDK.
@@ -258,7 +258,7 @@ if ($Test.Length -eq 1) { $Test = $Test[0].Split(",") }
258258

259259
if ($Test -contains "*") {
260260
# Explicitly don't include llbuild yet since tests are known to fail on Windows
261-
$Test = @("lld", "lldb", "swift", "dispatch", "foundation", "xctest", "swift-format", "sourcekit-lsp")
261+
$Test = @("lld", "lldb", "lldb-swift", "swift", "dispatch", "foundation", "xctest", "swift-format", "sourcekit-lsp")
262262
}
263263

264264
if ($UseHostToolchain -is [string]) {
@@ -1273,7 +1273,7 @@ function Get-Dependencies {
12731273

12741274
DownloadAndVerify $PinnedBuild "$BinaryCache\$PinnedToolchain.exe" $PinnedSHA256
12751275

1276-
if ($Test -contains "lldb") {
1276+
if ($Test -contains "lldb" || $Test -contains "lldb-swift") {
12771277
# The make tool isn't part of MSYS
12781278
$GnuWin32MakeURL = "https://downloads.sourceforge.net/project/ezwinports/make-4.4.1-without-guile-w32-bin.zip"
12791279
$GnuWin32MakeHash = "fb66a02b530f7466f6222ce53c0b602c5288e601547a034e4156a512dd895ee7"
@@ -1346,7 +1346,7 @@ function Get-Dependencies {
13461346
Install-PIPIfNeeded
13471347
Install-PythonModule "packaging" # For building LLVM 18+
13481348
Install-PythonModule "setuptools" # Required for SWIG support
1349-
if ($Test -contains "lldb") {
1349+
if ($Test -contains "lldb" | $Test -contains "lldb-swift") {
13501350
Install-PythonModule "psutil" # Required for testing LLDB
13511351
}
13521352
}
@@ -2279,16 +2279,20 @@ function Build-Compilers([Hashtable] $Platform, [string] $Variant) {
22792279
Write-PList -Settings $Settings -Path "$($Platform.ToolchainInstallRoot)\ToolchainInfo.plist"
22802280
}
22812281

2282-
function Test-Compilers([Hashtable] $Platform, [string] $Variant, [switch] $TestClang, [switch] $TestLLD, [switch] $TestLLDB, [switch] $TestLLVM, [switch] $TestSwift) {
2282+
function Test-Compilers([Hashtable] $Platform, [string] $Variant, [switch] $TestClang, [switch] $TestLLD, [switch] $TestLLDB, [switch] $TestLLDBSwift, [switch] $TestLLVM, [switch] $TestSwift) {
22832283
Invoke-IsolatingEnvVars {
22842284
$env:Path = "$(Get-CMarkBinaryCache $Platform)\src;$(Get-ProjectBinaryCache $BuildPlatform Compilers)\tools\swift\libdispatch-windows-$($Platform.Architecture.LLVMName)-prefix\bin;$(Get-ProjectBinaryCache $BuildPlatform Compilers)\bin;$env:Path;$VSInstallRoot\DIA SDK\bin\$($HostPlatform.Architecture.VSName);$UnixToolsBinDir"
22852285
$TestingDefines = Get-CompilersDefines $Platform $Variant -Test
22862286
if ($TestLLVM) { $Targets += @("check-llvm") }
22872287
if ($TestClang) { $Targets += @("check-clang") }
22882288
if ($TestLLD) { $Targets += @("check-lld") }
22892289
if ($TestSwift) { $Targets += @("check-swift", "SwiftCompilerPlugin") }
2290-
if ($TestLLDB) {
2291-
$Targets += @("check-lldb")
2290+
if ($TestLLDB || $TestLLDBSwift) {
2291+
if (($TestLLDB && $TestLLDBSwift) || $TestLLDB) {
2292+
$Targets += @("check-lldb")
2293+
} else {
2294+
$Targets += @("check-lldb-swift")
2295+
}
22922296

22932297
# Override test filter for known issues in downstream LLDB
22942298
Load-LitTestOverrides ([IO.Path]::GetFullPath([IO.Path]::Combine($PSScriptRoot, "..", "..", "llvm-project", "lldb", "test", "windows-swift-llvm-lit-test-overrides.txt")))
@@ -4369,12 +4373,13 @@ if ($Stage) {
43694373
}
43704374

43714375
if (-not $IsCrossCompiling) {
4372-
$CompilersTests = @("clang", "lld", "lldb", "llvm", "swift")
4376+
$CompilersTests = @("clang", "lld", "lldb", "lldb-swift", "llvm", "swift")
43734377
if ($Test | Where-Object { $CompilersTests -contains $_ }) {
43744378
$Tests = @{
43754379
"-TestClang" = $Test -contains "clang";
43764380
"-TestLLD" = $Test -contains "lld";
43774381
"-TestLLDB" = $Test -contains "lldb";
4382+
"-TestLLDBSwift" = $Test -contains "lldb-swift";
43784383
"-TestLLVM" = $Test -contains "llvm";
43794384
"-TestSwift" = $Test -contains "swift";
43804385
}

0 commit comments

Comments
 (0)