Skip to content

Commit 4a96f45

Browse files
committed
[Build] Introduce --lldb-configure-tests option
We recently changed the build-script to stop configuring LLDB tests if `SKIP_TESTS_LLDB` is set (see rdar://109774179 and #66171). A common use-case is to build lldb without `-t` (to avoid running the tests) and then run the tests separately later. However, if we don't specify the `-t` flag to the build-script, `SKIP_TESTS_LLDB` is implicitly set. Meaning this multi-step way of running lldb tests regressed. This patch addresses this by creating a new `--lldb-configure-tests` option which when set makes sure we set the CMake variable `LLDB_INCLUDE_TESTS` (which will be the default behaviour). The preset for which we originally introduced the `SKIP_TESTS_LLDB` check now sets this new option to `0` to avoid configuring LLDB tests. The preset skips running the tests anyway, we're not losing test coverage. (cherry picked from commit 511c344)
1 parent 9598e57 commit 4a96f45

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

utils/build-presets.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,6 +1398,10 @@ mixin-preset=
13981398
skip-test-lldb
13991399
skip-test-playgroundsupport
14001400

1401+
# Don't configure LLDB tests either since that
1402+
# would require us to build libcxx (rdar://109774179)
1403+
lldb-configure-tests=0
1404+
14011405
[preset: buildbot_osx_package,use_os_runtime]
14021406
mixin-preset=
14031407
buildbot_osx_package

utils/build-script-impl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ KNOWN_SETTINGS=(
174174
lldb-test-swift-compatibility "" "specify additional Swift compilers to test lldb with"
175175
lldb-test-swift-only "0" "when running lldb tests, only include Swift-specific tests"
176176
lldb-use-system-debugserver "" "don't try to codesign debugserver, and use the system's debugserver instead"
177+
lldb-configure-tests "1" "if set, will make sure we configure LLDB's test target without running the tests"
177178

178179
## LLVM Options
179180
llvm-enable-lto "" "Must be set to one of 'thin' or 'full'"
@@ -2187,7 +2188,7 @@ for host in "${ALL_HOSTS[@]}"; do
21872188
DOTEST_ARGS="${DOTEST_ARGS};-E;${DOTEST_EXTRA}"
21882189
fi
21892190

2190-
if [[ "${SKIP_TEST_LLDB}" ]]; then
2191+
if [[ $(true_false "${LLDB_CONFIGURE_TESTS}") == "FALSE" ]]; then
21912192
should_configure_tests="FALSE"
21922193
else
21932194
should_configure_tests=$(false_true ${BUILD_TOOLCHAIN_ONLY})

0 commit comments

Comments
 (0)