2015-03-14 04:55:07 +08:00
|
|
|
set(LLVM_SOURCE_DIR "${LLVM_MAIN_SRC_DIR}")
|
|
|
|
set(LLVM_BINARY_DIR "${LLVM_BINARY_DIR}")
|
|
|
|
set(LLVM_BUILD_MODE "%(build_mode)s")
|
|
|
|
set(LLVM_TOOLS_DIR "${LLVM_TOOLS_BINARY_DIR}/%(build_config)s")
|
|
|
|
set(LLVM_LIBS_DIR "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/%(build_config)s")
|
|
|
|
set(CLANG_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/..")
|
|
|
|
set(CLANG_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/..")
|
|
|
|
if(BUILD_SHARED_LIBS)
|
|
|
|
set(ENABLE_SHARED 1)
|
|
|
|
else()
|
|
|
|
set(ENABLE_SHARED 0)
|
|
|
|
endif(BUILD_SHARED_LIBS)
|
|
|
|
|
[LIT] First pass of LLDB LIT support
Summary:
This patch supplies basic infrastructure for LLDB to use LIT, and ports a few basic test cases from the LLDB test suite into LIT.
With this patch the LLDB lit system is not capable or intended to fully replace the existing LLDB test suite, but this first patch enables people to write lit tests for LLDB.
The lit substitution for %cc and %cxx default to the host compiler unless the CMake option LLDB_TEST_CLANG is On, in which case the in-tree clang will be used.
The target check-lldb-lit will run all lit tests including the lit-based executor for the unit tests. Alternatively there is a target generated for each subdirectory under the lit directory, so check-lldb-unit and check-lldb-expr will run just the tests under their respective directories.
The ported tests are not removed from the existing suite, and should not be until such a time when the lit runner is mature and in use by bots and workflows.
Reviewers: zturner, labath, jingham, tfiala
Subscribers: beanz, mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D24591
llvm-svn: 281651
2016-09-16 04:13:55 +08:00
|
|
|
option(LLDB_TEST_CLANG "Use in-tree clang when testing lldb" Off)
|
|
|
|
set(LLDB_TEST_C_COMPILER "" CACHE STRING "C compiler to use when testing LLDB")
|
|
|
|
set(LLDB_TEST_CXX_COMPILER "" CACHE STRING "C++ compiler to use when testing LLDB")
|
|
|
|
|
2015-03-14 04:55:07 +08:00
|
|
|
configure_lit_site_cfg(
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
|
|
|
|
configure_lit_site_cfg(
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
|
|
|
|
)
|
|
|
|
|
|
|
|
set(LLDB_TEST_DEPS
|
|
|
|
LLDBUnitTests
|
[LIT] First pass of LLDB LIT support
Summary:
This patch supplies basic infrastructure for LLDB to use LIT, and ports a few basic test cases from the LLDB test suite into LIT.
With this patch the LLDB lit system is not capable or intended to fully replace the existing LLDB test suite, but this first patch enables people to write lit tests for LLDB.
The lit substitution for %cc and %cxx default to the host compiler unless the CMake option LLDB_TEST_CLANG is On, in which case the in-tree clang will be used.
The target check-lldb-lit will run all lit tests including the lit-based executor for the unit tests. Alternatively there is a target generated for each subdirectory under the lit directory, so check-lldb-unit and check-lldb-expr will run just the tests under their respective directories.
The ported tests are not removed from the existing suite, and should not be until such a time when the lit runner is mature and in use by bots and workflows.
Reviewers: zturner, labath, jingham, tfiala
Subscribers: beanz, mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D24591
llvm-svn: 281651
2016-09-16 04:13:55 +08:00
|
|
|
lldb
|
2015-03-14 04:55:07 +08:00
|
|
|
)
|
2016-10-22 02:38:44 +08:00
|
|
|
|
|
|
|
if(NOT LLDB_BUILT_STANDALONE)
|
|
|
|
list(APPEND LLDB_TEST_DEPS FileCheck not)
|
|
|
|
endif()
|
2016-09-16 05:32:51 +08:00
|
|
|
|
|
|
|
# lldb-server is not built on every platform.
|
|
|
|
if (TARGET lldb-server)
|
|
|
|
list(APPEND LLDB_TEST_DEPS lldb-server)
|
|
|
|
endif()
|
|
|
|
|
2016-09-16 04:23:31 +08:00
|
|
|
if(APPLE)
|
|
|
|
list(APPEND LLDB_TEST_DEPS debugserver)
|
|
|
|
endif()
|
[LIT] First pass of LLDB LIT support
Summary:
This patch supplies basic infrastructure for LLDB to use LIT, and ports a few basic test cases from the LLDB test suite into LIT.
With this patch the LLDB lit system is not capable or intended to fully replace the existing LLDB test suite, but this first patch enables people to write lit tests for LLDB.
The lit substitution for %cc and %cxx default to the host compiler unless the CMake option LLDB_TEST_CLANG is On, in which case the in-tree clang will be used.
The target check-lldb-lit will run all lit tests including the lit-based executor for the unit tests. Alternatively there is a target generated for each subdirectory under the lit directory, so check-lldb-unit and check-lldb-expr will run just the tests under their respective directories.
The ported tests are not removed from the existing suite, and should not be until such a time when the lit runner is mature and in use by bots and workflows.
Reviewers: zturner, labath, jingham, tfiala
Subscribers: beanz, mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D24591
llvm-svn: 281651
2016-09-16 04:13:55 +08:00
|
|
|
|
|
|
|
if(LLDB_TEST_CLANG)
|
|
|
|
if(LLDB_TEST_C_COMPILER OR LLDB_TEST_CXX_COMPILER)
|
|
|
|
message(SEND_ERROR "Cannot override LLDB_TEST_<LANG>_COMPILER and set LLDB_TEST_CLANG.")
|
|
|
|
endif()
|
|
|
|
list(APPEND LLDB_TEST_DEPS clang)
|
|
|
|
endif()
|
|
|
|
|
2015-03-14 04:55:07 +08:00
|
|
|
set(LLDB_TEST_PARAMS
|
|
|
|
lldb_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
|
|
|
|
)
|
|
|
|
|
[LIT] First pass of LLDB LIT support
Summary:
This patch supplies basic infrastructure for LLDB to use LIT, and ports a few basic test cases from the LLDB test suite into LIT.
With this patch the LLDB lit system is not capable or intended to fully replace the existing LLDB test suite, but this first patch enables people to write lit tests for LLDB.
The lit substitution for %cc and %cxx default to the host compiler unless the CMake option LLDB_TEST_CLANG is On, in which case the in-tree clang will be used.
The target check-lldb-lit will run all lit tests including the lit-based executor for the unit tests. Alternatively there is a target generated for each subdirectory under the lit directory, so check-lldb-unit and check-lldb-expr will run just the tests under their respective directories.
The ported tests are not removed from the existing suite, and should not be until such a time when the lit runner is mature and in use by bots and workflows.
Reviewers: zturner, labath, jingham, tfiala
Subscribers: beanz, mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D24591
llvm-svn: 281651
2016-09-16 04:13:55 +08:00
|
|
|
add_lit_testsuite(check-lldb-lit "Running lldb lit test suite"
|
2015-03-14 04:55:07 +08:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
PARAMS lldb_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
|
|
|
|
lldb_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
|
|
|
|
DEPENDS ${LLDB_TEST_DEPS}
|
|
|
|
)
|
|
|
|
|
[LIT] First pass of LLDB LIT support
Summary:
This patch supplies basic infrastructure for LLDB to use LIT, and ports a few basic test cases from the LLDB test suite into LIT.
With this patch the LLDB lit system is not capable or intended to fully replace the existing LLDB test suite, but this first patch enables people to write lit tests for LLDB.
The lit substitution for %cc and %cxx default to the host compiler unless the CMake option LLDB_TEST_CLANG is On, in which case the in-tree clang will be used.
The target check-lldb-lit will run all lit tests including the lit-based executor for the unit tests. Alternatively there is a target generated for each subdirectory under the lit directory, so check-lldb-unit and check-lldb-expr will run just the tests under their respective directories.
The ported tests are not removed from the existing suite, and should not be until such a time when the lit runner is mature and in use by bots and workflows.
Reviewers: zturner, labath, jingham, tfiala
Subscribers: beanz, mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D24591
llvm-svn: 281651
2016-09-16 04:13:55 +08:00
|
|
|
set_target_properties(check-lldb-lit PROPERTIES FOLDER "LLDB tests")
|
|
|
|
|
|
|
|
add_lit_testsuites(LLDB ${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
PARAMS lldb_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
|
|
|
|
lldb_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
|
|
|
|
DEPENDS ${LLDB_TEST_DEPS}
|
|
|
|
)
|