[lldb/CMake] Add check-lldb-shell and check-lldb-api targets for Xcode

The Xcode generator does not provide the auto-generated targets where
you can append a folder name to check-lldb. Instead add two custom lit
targets to run just the shell and api tests.
This commit is contained in:
Jonas Devlieghere 2020-01-21 13:21:34 -08:00
parent 89e43f04ba
commit aa91ce3e1d
2 changed files with 16 additions and 0 deletions

View File

@ -179,3 +179,11 @@ configure_lit_site_cfg(
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
MAIN_CONFIG
${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py)
if (CMAKE_GENERATOR STREQUAL "Xcode")
# Xcode does not get the auto-generated targets. We need to create
# check-lldb-api manually.
add_lit_testsuite(check-lldb-api "Running lldb api test suite"
${CMAKE_CURRENT_BINARY_DIR}
DEPENDS lldb-test-deps)
endif()

View File

@ -7,3 +7,11 @@ configure_lit_site_cfg(
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/lit-lldb-init.in
${CMAKE_CURRENT_BINARY_DIR}/lit-lldb-init)
if (CMAKE_GENERATOR STREQUAL "Xcode")
# Xcode does not get the auto-generated targets. We need to create
# check-lldb-shell manually.
add_lit_testsuite(check-lldb-shell "Running lldb shell test suite"
${CMAKE_CURRENT_BINARY_DIR}
DEPENDS lldb-test-deps)
endif()