Stephen Hines | 2d1fdb2 | 2014-05-28 23:58:16 -0700 | [diff] [blame] | 1 | set(TSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS}) |
Pirama Arumuga Nainar | 799172d | 2016-03-03 15:50:30 -0800 | [diff] [blame^] | 2 | if(${COMPILER_RT_DEFAULT_TARGET_ARCH} MATCHES "x86_64") |
Pirama Arumuga Nainar | 259f706 | 2015-05-06 11:49:53 -0700 | [diff] [blame] | 3 | list(APPEND TSAN_TEST_DEPS GotsanRuntimeCheck) |
| 4 | endif() |
Stephen Hines | 2d1fdb2 | 2014-05-28 23:58:16 -0700 | [diff] [blame] | 5 | if(NOT COMPILER_RT_STANDALONE_BUILD) |
| 6 | list(APPEND TSAN_TEST_DEPS tsan) |
| 7 | endif() |
| 8 | if(COMPILER_RT_HAS_LIBCXX_SOURCES AND |
Pirama Arumuga Nainar | 799172d | 2016-03-03 15:50:30 -0800 | [diff] [blame^] | 9 | COMPILER_RT_TEST_COMPILER_ID STREQUAL "Clang" |
| 10 | AND NOT APPLE) |
Stephen Hines | 2d1fdb2 | 2014-05-28 23:58:16 -0700 | [diff] [blame] | 11 | list(APPEND TSAN_TEST_DEPS libcxx_tsan) |
| 12 | set(TSAN_HAS_LIBCXX True) |
| 13 | else() |
| 14 | set(TSAN_HAS_LIBCXX False) |
| 15 | endif() |
| 16 | |
| 17 | configure_lit_site_cfg( |
| 18 | ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in |
| 19 | ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg) |
| 20 | |
| 21 | if(COMPILER_RT_INCLUDE_TESTS) |
| 22 | configure_lit_site_cfg( |
| 23 | ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in |
| 24 | ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg) |
| 25 | list(APPEND TSAN_TEST_DEPS TsanUnitTests) |
| 26 | endif() |
| 27 | |
| 28 | add_lit_testsuite(check-tsan "Running ThreadSanitizer tests" |
| 29 | ${CMAKE_CURRENT_BINARY_DIR} |
| 30 | DEPENDS ${TSAN_TEST_DEPS}) |
| 31 | set_target_properties(check-tsan PROPERTIES FOLDER "TSan tests") |