2014-02-14 19:00:07 +08:00
|
|
|
configure_lit_site_cfg(
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/lit.common.configured.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/lit.common.configured)
|
|
|
|
|
|
|
|
# BlocksRuntime and builtins testsuites are not yet ported to lit.
|
|
|
|
# add_subdirectory(BlocksRuntime)
|
|
|
|
# add_subdirectory(builtins)
|
2014-02-14 19:42:22 +08:00
|
|
|
|
2014-02-19 18:04:29 +08:00
|
|
|
set(SANITIZER_COMMON_LIT_TEST_DEPS)
|
2014-02-18 15:52:40 +08:00
|
|
|
# When ANDROID, we build tests with the host compiler (i.e. CMAKE_C_COMPILER),
|
|
|
|
# and run tests with tools from the host toolchain.
|
2014-02-19 18:04:29 +08:00
|
|
|
if(NOT ANDROID)
|
|
|
|
if(NOT COMPILER_RT_STANDALONE_BUILD)
|
|
|
|
# Use LLVM utils and Clang from the same build tree.
|
|
|
|
list(APPEND SANITIZER_COMMON_LIT_TEST_DEPS
|
|
|
|
clang clang-headers FileCheck count not llvm-nm llvm-symbolizer
|
|
|
|
compiler-rt-headers)
|
|
|
|
endif()
|
2014-02-18 15:52:40 +08:00
|
|
|
if(UNIX)
|
|
|
|
list(APPEND SANITIZER_COMMON_LIT_TEST_DEPS SanitizerLintCheck)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2014-02-14 19:42:22 +08:00
|
|
|
# Run sanitizer tests only if we're sure that clang would produce
|
|
|
|
# working binaries.
|
|
|
|
if(COMPILER_RT_CAN_EXECUTE_TESTS)
|
2014-02-14 22:45:13 +08:00
|
|
|
if(ASAN_SUPPORTED_ARCH OR ANDROID)
|
2014-02-14 22:06:10 +08:00
|
|
|
add_subdirectory(asan)
|
|
|
|
endif()
|
2014-02-14 20:05:41 +08:00
|
|
|
if(DFSAN_SUPPORTED_ARCH)
|
|
|
|
add_subdirectory(dfsan)
|
|
|
|
endif()
|
2014-02-14 20:26:05 +08:00
|
|
|
if(LSAN_SUPPORTED_ARCH)
|
|
|
|
add_subdirectory(lsan)
|
|
|
|
endif()
|
2014-02-14 21:02:58 +08:00
|
|
|
if(MSAN_SUPPORTED_ARCH)
|
|
|
|
add_subdirectory(msan)
|
|
|
|
endif()
|
2014-04-01 06:45:37 +08:00
|
|
|
if(PROFILE_SUPPORTED_ARCH)
|
|
|
|
add_subdirectory(profile)
|
|
|
|
endif()
|
2014-02-20 20:18:08 +08:00
|
|
|
if(SANITIZER_COMMON_SUPPORTED_ARCH)
|
|
|
|
add_subdirectory(sanitizer_common)
|
|
|
|
endif()
|
2014-02-14 22:35:48 +08:00
|
|
|
if(TSAN_SUPPORTED_ARCH)
|
|
|
|
add_subdirectory(tsan)
|
|
|
|
endif()
|
2014-02-14 19:42:22 +08:00
|
|
|
if(UBSAN_SUPPORTED_ARCH)
|
|
|
|
add_subdirectory(ubsan)
|
|
|
|
endif()
|
|
|
|
endif()
|
2014-02-20 20:36:26 +08:00
|
|
|
|
|
|
|
if(COMPILER_RT_STANDALONE_BUILD)
|
|
|
|
# Now that we've traversed all the directories and know all the lit testsuites,
|
|
|
|
# introduce a rule to run to run all of them.
|
|
|
|
get_property(LLVM_LIT_TESTSUITES GLOBAL PROPERTY LLVM_LIT_TESTSUITES)
|
|
|
|
get_property(LLVM_LIT_DEPENDS GLOBAL PROPERTY LLVM_LIT_DEPENDS)
|
|
|
|
add_lit_target(check-all
|
|
|
|
"Running all regression tests"
|
|
|
|
${LLVM_LIT_TESTSUITES}
|
|
|
|
DEPENDS ${LLVM_LIT_DEPENDS})
|
|
|
|
endif()
|