Skip to content

Commit 90caec7

Browse files
[windows][lldb] enable faster tests in CI
1 parent a40a7be commit 90caec7

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
@@ -1895,12 +1895,17 @@ function Test-Compilers([Hashtable] $Platform, [switch] $TestClang, [switch] $Te
18951895
Write-Host "Copying '$RuntimeBinaryCache\bin\swiftCore.dll' to '$(Get-ProjectBinaryCache $BuildPlatform Compilers)\bin'"
18961896
Copy-Item "$RuntimeBinaryCache\bin\swiftCore.dll" "$(Get-ProjectBinaryCache $BuildPlatform Compilers)\bin"
18971897

1898+
$PythonRoot = "$(Get-PythonPath $BuildPlatform)\tools"
1899+
$env:Path = "$PythonRoot;$env:Path"
1900+
18981901
$TestingDefines += @{
18991902
LLDB_INCLUDE_TESTS = "YES";
19001903
# Check for required Python modules in CMake
19011904
LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS = "YES";
19021905
# No watchpoint support on windows: https://github.com/llvm/llvm-project/issues/24820
19031906
LLDB_TEST_USER_ARGS = "--skip-category=watchpoint";
1907+
# Specify the correct PYTHONHOME to LLDB in tests. Can be removed when https://github.com/swiftlang/llvm-project/pull/10811 lands.
1908+
LLDB_TEST_COMMON_ARGS="--env PYTHONHOME=$PythonRoot";
19041909
# gtest sharding breaks llvm-lit's --xfail and LIT_XFAIL inputs: https://github.com/llvm/llvm-project/issues/102264
19051910
LLVM_LIT_ARGS = "-v --no-gtest-sharding --time-tests";
19061911
# LLDB Unit tests link against this library
@@ -3387,28 +3392,30 @@ if (-not $SkipBuild) {
33873392
Invoke-BuildStep Build-LLBuild $HostPlatform
33883393
Invoke-BuildStep Build-ArgumentParser $HostPlatform
33893394
Invoke-BuildStep Build-Driver $HostPlatform
3390-
Invoke-BuildStep Build-Crypto $HostPlatform
3391-
Invoke-BuildStep Build-Collections $HostPlatform
3392-
Invoke-BuildStep Build-ASN1 $HostPlatform
3393-
Invoke-BuildStep Build-Certificates $HostPlatform
3394-
Invoke-BuildStep Build-System $HostPlatform
3395-
Invoke-BuildStep Build-Build $HostPlatform
3396-
Invoke-BuildStep Build-PackageManager $HostPlatform
3397-
Invoke-BuildStep Build-Markdown $HostPlatform
3398-
Invoke-BuildStep Build-Format $HostPlatform
3399-
Invoke-BuildStep Build-LMDB $HostPlatform
3400-
Invoke-BuildStep Build-IndexStoreDB $HostPlatform
3401-
Invoke-BuildStep Build-SourceKitLSP $HostPlatform
3402-
Invoke-BuildStep Build-Inspect $HostPlatform
3395+
if (-not(Compare-Object $Test @("lldb"))) {
3396+
Invoke-BuildStep Build-Crypto $HostPlatform
3397+
Invoke-BuildStep Build-Collections $HostPlatform
3398+
Invoke-BuildStep Build-ASN1 $HostPlatform
3399+
Invoke-BuildStep Build-Certificates $HostPlatform
3400+
Invoke-BuildStep Build-System $HostPlatform
3401+
Invoke-BuildStep Build-Build $HostPlatform
3402+
Invoke-BuildStep Build-PackageManager $HostPlatform
3403+
Invoke-BuildStep Build-Markdown $HostPlatform
3404+
Invoke-BuildStep Build-Format $HostPlatform
3405+
Invoke-BuildStep Build-LMDB $HostPlatform
3406+
Invoke-BuildStep Build-IndexStoreDB $HostPlatform
3407+
Invoke-BuildStep Build-SourceKitLSP $HostPlatform
3408+
Invoke-BuildStep Build-Inspect $HostPlatform
3409+
}
34033410
}
34043411

34053412
Install-HostToolchain
34063413

3407-
if (-not $SkipBuild) {
3414+
if (-not $SkipBuild -and -not(Compare-Object $Test @("lldb"))) {
34083415
Invoke-BuildStep Build-mimalloc $HostPlatform
34093416
}
34103417

3411-
if (-not $SkipBuild -and -not $IsCrossCompiling) {
3418+
if (-not $SkipBuild -and -not $IsCrossCompiling -and -not(Compare-Object $Test @("lldb"))) {
34123419
Invoke-BuildStep Build-DocC $HostPlatform
34133420
}
34143421

0 commit comments

Comments
 (0)