1set(ESAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS}) 2if(NOT COMPILER_RT_STANDALONE_BUILD) 3 list(APPEND ESAN_TEST_DEPS esan) 4endif() 5 6set(ESAN_TESTSUITES) 7 8set(ESAN_TEST_ARCH ${ESAN_SUPPORTED_ARCH}) 9 10set(ESAN_LIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) 11 12foreach(arch ${ESAN_TEST_ARCH}) 13 set(ESAN_TEST_TARGET_ARCH ${arch}) 14 string(TOLOWER "-${arch}" ESAN_TEST_CONFIG_SUFFIX) 15 get_target_flags_for_arch(${arch} ESAN_TEST_TARGET_CFLAGS) 16 string(REPLACE ";" " " ESAN_TEST_TARGET_CFLAGS "${ESAN_TEST_TARGET_CFLAGS}") 17 18 string(TOUPPER ${arch} ARCH_UPPER_CASE) 19 set(CONFIG_NAME ${ARCH_UPPER_CASE}Config) 20 21 configure_lit_site_cfg( 22 ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in 23 ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg) 24 list(APPEND ESAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}) 25endforeach() 26 27# TODO(bruening): add Unit/ tests as well 28 29add_lit_testsuite(check-esan "Running EfficiencySanitizer tests" 30 ${ESAN_TESTSUITES} 31 DEPENDS ${ESAN_TEST_DEPS}) 32set_target_properties(check-esan PROPERTIES FOLDER "Compiler-RT Misc") 33