forked from OSchip/llvm-project
[CMake] lit tests shouldn't depend on runtimes in standalone build
llvm-svn: 201771
This commit is contained in:
parent
66d797af1f
commit
5e6d83258e
|
@ -46,12 +46,11 @@ configure_lit_site_cfg(
|
|||
)
|
||||
endif()
|
||||
|
||||
# Run ASan tests only if we're sure we may produce working binaries.
|
||||
set(ASAN_TEST_DEPS
|
||||
${SANITIZER_COMMON_LIT_TEST_DEPS}
|
||||
asan)
|
||||
set(ASAN_TEST_PARAMS
|
||||
asan_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
|
||||
set(ASAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
|
||||
if(NOT COMPILER_RT_STANDALONE_BUILD)
|
||||
list(APPEND ASAN_TEST_DEPS asan)
|
||||
endif()
|
||||
|
||||
# FIXME: support unit test in the android test runner
|
||||
if(COMPILER_RT_INCLUDE_TESTS AND NOT CAN_TARGET_arm_android)
|
||||
list(APPEND ASAN_TEST_DEPS AsanUnitTests)
|
||||
|
@ -59,6 +58,5 @@ if(COMPILER_RT_INCLUDE_TESTS AND NOT CAN_TARGET_arm_android)
|
|||
endif()
|
||||
add_lit_testsuite(check-asan "Running the AddressSanitizer tests"
|
||||
${ASAN_TESTSUITES}
|
||||
PARAMS ${ASAN_TEST_PARAMS}
|
||||
DEPENDS ${ASAN_TEST_DEPS})
|
||||
set_target_properties(check-asan PROPERTIES FOLDER "ASan tests")
|
||||
|
|
|
@ -4,9 +4,11 @@ configure_lit_site_cfg(
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
|
||||
|
||||
set(DFSAN_TEST_DEPS
|
||||
${SANITIZER_COMMON_LIT_TEST_DEPS}
|
||||
dfsan)
|
||||
set(DFSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
|
||||
if(NOT COMPILER_RT_STANDALONE_BUILD)
|
||||
list(APPEND DFSAN_TEST_DEPS dfsan)
|
||||
endif()
|
||||
|
||||
add_lit_testsuite(check-dfsan "Running the DataFlowSanitizer tests"
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
DEPENDS ${DFSAN_TEST_DEPS})
|
||||
|
|
|
@ -11,10 +11,10 @@ configure_lit_site_cfg(
|
|||
${CMAKE_CURRENT_BINARY_DIR}/AsanConfig/lit.site.cfg)
|
||||
|
||||
if(NOT APPLE AND NOT ANDROID)
|
||||
set(LSAN_TEST_DEPS
|
||||
${SANITIZER_COMMON_LIT_TEST_DEPS}
|
||||
lsan
|
||||
asan)
|
||||
set(LSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
|
||||
if(NOT COMPILER_RT_STANDALONE_BUILD)
|
||||
list(APPEND LSAN_TEST_DEPS lsan asan)
|
||||
endif()
|
||||
add_lit_testsuite(check-lsan "Running the LeakSanitizer tests"
|
||||
${CMAKE_CURRENT_BINARY_DIR}/LsanConfig
|
||||
${CMAKE_CURRENT_BINARY_DIR}/AsanConfig
|
||||
|
|
|
@ -4,9 +4,10 @@ configure_lit_site_cfg(
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
|
||||
|
||||
set(MSAN_TEST_DEPS
|
||||
${SANITIZER_COMMON_LIT_TEST_DEPS}
|
||||
msan)
|
||||
set(MSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
|
||||
if(NOT COMPILER_RT_STANDALONE_BUILD)
|
||||
list(APPEND MSAN_TEST_DEPS msan)
|
||||
endif()
|
||||
|
||||
if(COMPILER_RT_INCLUDE_TESTS AND COMPILER_RT_HAS_LIBCXX_SOURCES)
|
||||
configure_lit_site_cfg(
|
||||
|
|
|
@ -2,9 +2,10 @@ configure_lit_site_cfg(
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
|
||||
|
||||
set(TSAN_TEST_DEPS
|
||||
${SANITIZER_COMMON_LIT_TEST_DEPS}
|
||||
tsan)
|
||||
set(TSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
|
||||
if(NOT COMPILER_RT_STANDALONE_BUILD)
|
||||
list(APPEND TSAN_TEST_DEPS tsan)
|
||||
endif()
|
||||
|
||||
if(COMPILER_RT_INCLUDE_TESTS)
|
||||
configure_lit_site_cfg(
|
||||
|
|
|
@ -10,10 +10,11 @@ configure_lit_site_cfg(
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/AsanConfig/lit.site.cfg)
|
||||
|
||||
set(UBSAN_TEST_DEPS
|
||||
${SANITIZER_COMMON_LIT_TEST_DEPS}
|
||||
ubsan
|
||||
asan)
|
||||
set(UBSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
|
||||
if(NOT COMPILER_RT_STANDALONE_BUILD)
|
||||
list(APPEND UBSAN_TEST_DEPS ubsan asan)
|
||||
endif()
|
||||
|
||||
add_lit_testsuite(check-ubsan "Running UndefinedBehaviorSanitizer tests"
|
||||
${CMAKE_CURRENT_BINARY_DIR}/UbsanConfig
|
||||
${CMAKE_CURRENT_BINARY_DIR}/AsanConfig
|
||||
|
|
Loading…
Reference in New Issue