Home | History | Annotate | Download | only in esan
      1 set(ESAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
      2 if(NOT COMPILER_RT_STANDALONE_BUILD)
      3   list(APPEND ESAN_TEST_DEPS esan)
      4 endif()
      5 
      6 set(ESAN_TESTSUITES)
      7 
      8 set(ESAN_TEST_ARCH ${ESAN_SUPPORTED_ARCH})
      9 
     10 set(ESAN_LIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
     11 
     12 foreach(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})
     25 endforeach()
     26 
     27 # TODO(bruening): add Unit/ tests as well
     28 
     29 add_lit_testsuite(check-esan "Running EfficiencySanitizer tests"
     30   ${ESAN_TESTSUITES}
     31   DEPENDS ${ESAN_TEST_DEPS})
     32 set_target_properties(check-esan PROPERTIES FOLDER "Compiler-RT Misc")
     33