2014-02-14 20:05:41 +08:00
|
|
|
set(DFSAN_LIT_TESTS_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
|
2016-02-10 00:20:37 +08:00
|
|
|
set(DFSAN_TESTSUITES)
|
|
|
|
|
|
|
|
set(DFSAN_TEST_ARCH ${DFSAN_SUPPORTED_ARCH})
|
|
|
|
if(APPLE)
|
|
|
|
darwin_filter_host_archs(DFSAN_SUPPORTED_ARCH DFSAN_TEST_ARCH)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
foreach(arch ${DFSAN_TEST_ARCH})
|
2016-02-23 09:34:17 +08:00
|
|
|
set(DFSAN_TEST_TARGET_ARCH ${arch})
|
2016-02-10 00:20:37 +08:00
|
|
|
string(TOLOWER "-${arch}" DFSAN_TEST_CONFIG_SUFFIX)
|
2016-11-30 03:25:53 +08:00
|
|
|
get_test_cc_for_arch(${arch} DFSAN_TEST_TARGET_CC DFSAN_TEST_TARGET_CFLAGS)
|
2016-02-10 00:20:37 +08:00
|
|
|
string(TOUPPER ${arch} ARCH_UPPER_CASE)
|
|
|
|
set(CONFIG_NAME ${ARCH_UPPER_CASE}Config)
|
|
|
|
|
|
|
|
configure_lit_site_cfg(
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg)
|
|
|
|
list(APPEND DFSAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME})
|
|
|
|
endforeach()
|
2014-02-14 20:05:41 +08:00
|
|
|
|
2014-02-20 17:47:18 +08:00
|
|
|
set(DFSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
|
|
|
|
if(NOT COMPILER_RT_STANDALONE_BUILD)
|
|
|
|
list(APPEND DFSAN_TEST_DEPS dfsan)
|
|
|
|
endif()
|
|
|
|
|
2014-02-14 20:05:41 +08:00
|
|
|
add_lit_testsuite(check-dfsan "Running the DataFlowSanitizer tests"
|
2016-02-10 00:20:37 +08:00
|
|
|
${DFSAN_TESTSUITES}
|
2014-02-14 20:05:41 +08:00
|
|
|
DEPENDS ${DFSAN_TEST_DEPS})
|
2016-07-12 05:51:56 +08:00
|
|
|
set_target_properties(check-dfsan PROPERTIES FOLDER "Compiler-RT Misc")
|