Skip to content

Commit 511c344

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.
1 parent 12f01ce commit 511c344

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
@@ -1416,6 +1416,10 @@ mixin-preset=
14161416
skip-test-lldb
14171417
skip-test-playgroundsupport
14181418

1419+
# Don't configure LLDB tests either since that
1420+
# would require us to build libcxx (rdar://109774179)
1421+
lldb-configure-tests=0
1422+
14191423
[preset: buildbot_osx_package,use_os_runtime]
14201424
mixin-preset=
14211425
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'"
@@ -2197,7 +2198,7 @@ for host in "${ALL_HOSTS[@]}"; do
21972198
DOTEST_ARGS="${DOTEST_ARGS};-E;${DOTEST_EXTRA}"
21982199
fi
21992200

2200-
if [[ "${SKIP_TEST_LLDB}" ]]; then
2201+
if [[ $(true_false "${LLDB_CONFIGURE_TESTS}") == "FALSE" ]]; then
22012202
should_configure_tests="FALSE"
22022203
else
22032204
should_configure_tests=$(false_true ${BUILD_TOOLCHAIN_ONLY})

0 commit comments

Comments
 (0)