Skip to content

Commit d5432c1

Browse files
[windows][lldb] enable faster tests in CI
1 parent 276261c commit d5432c1

File tree

2 files changed

+27
-15
lines changed

2 files changed

+27
-15
lines changed

utils/build-windows-toolchain.bat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,18 @@ if "%TestArg:~-1%"=="," (set TestArg=%TestArg:~0,-1%) else (set TestArg= )
6868
set SkipPackagingArg=-SkipPackaging
6969
if not "%SKIP_PACKAGING%"=="1" set "SkipPackagingArg= "
7070

71+
:: Build the -WindowsSDKs argument, if any
72+
set "WindowsSDKsArg= "
73+
if not "%WINDOWS_SDKS%"=="" set "WindowsSDKsArg=-WindowsSDKs %WINDOWS_SDKS%"
74+
7175
call :CloneRepositories || (exit /b 1)
7276

7377
:: We only have write access to BuildRoot, so use that as the image root.
7478
powershell.exe -ExecutionPolicy RemoteSigned -File %~dp0build.ps1 ^
7579
-SourceCache %SourceRoot% ^
7680
-BinaryCache %BuildRoot% ^
7781
-ImageRoot %BuildRoot% ^
82+
%WindowsSDKsArg% ^
7883
%SkipPackagingArg% ^
7984
%TestArg% ^
8085
-Stage %PackageRoot% ^

utils/build.ps1

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1905,12 +1905,17 @@ function Test-Compilers([Hashtable] $Platform, [string] $Variant, [switch] $Test
19051905
Write-Host "Copying '$RuntimeBinaryCache\bin\swiftCore.dll' to '$(Get-ProjectBinaryCache $BuildPlatform Compilers)\bin'"
19061906
Copy-Item "$RuntimeBinaryCache\bin\swiftCore.dll" "$(Get-ProjectBinaryCache $BuildPlatform Compilers)\bin"
19071907

1908+
$PythonRoot = "$(Get-PythonPath $BuildPlatform)\tools"
1909+
$env:Path = "$PythonRoot;$env:Path"
1910+
19081911
$TestingDefines += @{
19091912
LLDB_INCLUDE_TESTS = "YES";
19101913
# Check for required Python modules in CMake
19111914
LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS = "YES";
19121915
# No watchpoint support on windows: https://github.com/llvm/llvm-project/issues/24820
19131916
LLDB_TEST_USER_ARGS = "--skip-category=watchpoint";
1917+
# Specify the correct PYTHONHOME to LLDB in tests. Can be removed when https://github.com/swiftlang/llvm-project/pull/10811 lands.
1918+
LLDB_TEST_COMMON_ARGS="--env PYTHONHOME=$PythonRoot";
19141919
# gtest sharding breaks llvm-lit's --xfail and LIT_XFAIL inputs: https://github.com/llvm/llvm-project/issues/102264
19151920
LLVM_LIT_ARGS = "-v --no-gtest-sharding --time-tests";
19161921
# LLDB Unit tests link against this library
@@ -3434,19 +3439,21 @@ if (-not $SkipBuild) {
34343439
Invoke-BuildStep Build-LLBuild $HostPlatform
34353440
Invoke-BuildStep Build-ArgumentParser $HostPlatform
34363441
Invoke-BuildStep Build-Driver $HostPlatform
3437-
Invoke-BuildStep Build-Crypto $HostPlatform
3438-
Invoke-BuildStep Build-Collections $HostPlatform
3439-
Invoke-BuildStep Build-ASN1 $HostPlatform
3440-
Invoke-BuildStep Build-Certificates $HostPlatform
3441-
Invoke-BuildStep Build-System $HostPlatform
3442-
Invoke-BuildStep Build-Build $HostPlatform
3443-
Invoke-BuildStep Build-PackageManager $HostPlatform
3444-
Invoke-BuildStep Build-Markdown $HostPlatform
3445-
Invoke-BuildStep Build-Format $HostPlatform
3446-
Invoke-BuildStep Build-LMDB $HostPlatform
3447-
Invoke-BuildStep Build-IndexStoreDB $HostPlatform
3448-
Invoke-BuildStep Build-SourceKitLSP $HostPlatform
3449-
Invoke-BuildStep Build-Inspect $HostPlatform
3442+
if (-not(Compare-Object $Test @("lldb"))) {
3443+
Invoke-BuildStep Build-Crypto $HostPlatform
3444+
Invoke-BuildStep Build-Collections $HostPlatform
3445+
Invoke-BuildStep Build-ASN1 $HostPlatform
3446+
Invoke-BuildStep Build-Certificates $HostPlatform
3447+
Invoke-BuildStep Build-System $HostPlatform
3448+
Invoke-BuildStep Build-Build $HostPlatform
3449+
Invoke-BuildStep Build-PackageManager $HostPlatform
3450+
Invoke-BuildStep Build-Markdown $HostPlatform
3451+
Invoke-BuildStep Build-Format $HostPlatform
3452+
Invoke-BuildStep Build-LMDB $HostPlatform
3453+
Invoke-BuildStep Build-IndexStoreDB $HostPlatform
3454+
Invoke-BuildStep Build-SourceKitLSP $HostPlatform
3455+
Invoke-BuildStep Build-Inspect $HostPlatform
3456+
}
34503457
}
34513458

34523459
Install-HostToolchain
@@ -3455,11 +3462,11 @@ if ($IncludeNoAsserts) {
34553462
Build-NoAssertsToolchain
34563463
}
34573464

3458-
if (-not $SkipBuild) {
3465+
if (-not $SkipBuild -and -not(Compare-Object $Test @("lldb"))) {
34593466
Invoke-BuildStep Build-mimalloc $HostPlatform
34603467
}
34613468

3462-
if (-not $SkipBuild -and -not $IsCrossCompiling) {
3469+
if (-not $SkipBuild -and -not $IsCrossCompiling -and -not(Compare-Object $Test @("lldb"))) {
34633470
Invoke-BuildStep Build-DocC $HostPlatform
34643471
}
34653472

0 commit comments

Comments
 (0)