Home | History | Annotate | Download | only in lit_tests
      1 set(MSAN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..)
      2 set(MSAN_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/..)
      3 
      4 configure_lit_site_cfg(
      5   ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
      6   ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
      7   )
      8 
      9 configure_lit_site_cfg(
     10   ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in
     11   ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
     12   )
     13 
     14 if(COMPILER_RT_CAN_EXECUTE_TESTS)
     15   # Run MSan tests only if we're sure we may produce working binaries.
     16   set(MSAN_TEST_DEPS
     17     clang clang-headers FileCheck count not llvm-nm llvm-symbolizer
     18     ${MSAN_RUNTIME_LIBRARIES}
     19     )
     20   set(MSAN_TEST_PARAMS
     21     msan_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
     22     )
     23   if(LLVM_INCLUDE_TESTS)
     24     list(APPEND MSAN_TEST_DEPS MsanUnitTests)
     25   endif()
     26   add_lit_testsuite(check-msan "Running the MemorySanitizer tests"
     27     ${CMAKE_CURRENT_BINARY_DIR}
     28     PARAMS ${MSAN_TEST_PARAMS}
     29     DEPENDS ${MSAN_TEST_DEPS}
     30     )
     31   set_target_properties(check-msan PROPERTIES FOLDER "MSan tests")
     32 endif()
     33