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

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 21 13:22:46 PST 2020


Author: Jonas Devlieghere
Date: 2020-01-21T13:22:33-08:00
New Revision: aa91ce3e1dd53a614894d5bef515c5859eea368a

URL: https://github.com/llvm/llvm-project/commit/aa91ce3e1dd53a614894d5bef515c5859eea368a
DIFF: https://github.com/llvm/llvm-project/commit/aa91ce3e1dd53a614894d5bef515c5859eea368a.diff

LOG: [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.

Added: 
    

Modified: 
    lldb/test/API/CMakeLists.txt
    lldb/test/Shell/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/CMakeLists.txt b/lldb/test/API/CMakeLists.txt
index 0fe88337ba58..9aad9fc750ca 100644
--- a/lldb/test/API/CMakeLists.txt
+++ b/lldb/test/API/CMakeLists.txt
@@ -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()

diff  --git a/lldb/test/Shell/CMakeLists.txt b/lldb/test/Shell/CMakeLists.txt
index 91b4e282204b..d203f1e093c7 100644
--- a/lldb/test/Shell/CMakeLists.txt
+++ b/lldb/test/Shell/CMakeLists.txt
@@ -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()


        


More information about the lldb-commits mailing list