diff options
author | Vedant Kumar <vsk@apple.com> | 2018-01-18 01:16:30 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2018-01-18 01:16:30 +0000 |
commit | 3c3345be1bf4c706bc7f44e4fa91342bdc91f4b1 (patch) | |
tree | 6509a1b849b15e81642bfcb8865423b97d99c43c /lldb/test/CMakeLists.txt | |
parent | 53b3855b2ba2a35f9006c75ccc1f7601cb15f079 (diff) | |
download | bcm5719-llvm-3c3345be1bf4c706bc7f44e4fa91342bdc91f4b1.tar.gz bcm5719-llvm-3c3345be1bf4c706bc7f44e4fa91342bdc91f4b1.zip |
[CMake] Make check-lldb work with LLDB_CODESIGN_IDENTITY=''
On Darwin, if a test machine isn't set up for code-signing (see
docs/code-signing.txt), running check-lldb should use the system
debugserver instead of the unsigned one built in-tree. This makes it
possible to run lldb's test suite without having code-signing set up,
which is really convenient.
Differential Revision: https://reviews.llvm.org/D42215
llvm-svn: 322803
Diffstat (limited to 'lldb/test/CMakeLists.txt')
-rw-r--r-- | lldb/test/CMakeLists.txt | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/lldb/test/CMakeLists.txt b/lldb/test/CMakeLists.txt index 9826de38c3c..6fb8235907c 100644 --- a/lldb/test/CMakeLists.txt +++ b/lldb/test/CMakeLists.txt @@ -25,7 +25,9 @@ if(TARGET lldb-server) endif() if(TARGET debugserver) - list(APPEND LLDB_TEST_DEPS debugserver) + if(NOT CMAKE_HOST_APPLE OR LLDB_CODESIGN_IDENTITY) + list(APPEND LLDB_TEST_DEPS debugserver) + endif() endif() if(TARGET lldb-mi) @@ -95,7 +97,18 @@ if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows|Darwin") endif() if(CMAKE_HOST_APPLE) - list(APPEND LLDB_TEST_COMMON_ARGS --server $<TARGET_FILE:debugserver>) + if(LLDB_CODESIGN_IDENTITY) + set(DEBUGSERVER_PATH $<TARGET_FILE:debugserver>) + else() + execute_process( + COMMAND xcode-select -p + OUTPUT_VARIABLE XCODE_DEV_DIR) + string(STRIP ${XCODE_DEV_DIR} XCODE_DEV_DIR) + set(DEBUGSERVER_PATH + "${XCODE_DEV_DIR}/../SharedFrameworks/LLDB.framework/Resources/debugserver") + endif() + message(STATUS "Path to the lldb debugserver: ${DEBUGSERVER_PATH}") + list(APPEND LLDB_TEST_COMMON_ARGS --server ${DEBUGSERVER_PATH}) endif() set(LLDB_DOTEST_ARGS ${LLDB_TEST_COMMON_ARGS};${LLDB_TEST_USER_ARGS}) |