[compiler-rt] r201771 - [CMake] lit tests shouldn't depend on runtimes in standalone build

Alexey Samsonov samsonov at google.com
Thu Feb 20 01:47:19 PST 2014


Author: samsonov
Date: Thu Feb 20 03:47:18 2014
New Revision: 201771

URL: http://llvm.org/viewvc/llvm-project?rev=201771&view=rev
Log:
[CMake] lit tests shouldn't depend on runtimes in standalone build

Modified:
    compiler-rt/trunk/test/asan/CMakeLists.txt
    compiler-rt/trunk/test/dfsan/CMakeLists.txt
    compiler-rt/trunk/test/lsan/CMakeLists.txt
    compiler-rt/trunk/test/msan/CMakeLists.txt
    compiler-rt/trunk/test/tsan/CMakeLists.txt
    compiler-rt/trunk/test/ubsan/CMakeLists.txt

Modified: compiler-rt/trunk/test/asan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/CMakeLists.txt?rev=201771&r1=201770&r2=201771&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/CMakeLists.txt (original)
+++ compiler-rt/trunk/test/asan/CMakeLists.txt Thu Feb 20 03:47:18 2014
@@ -46,12 +46,11 @@ configure_lit_site_cfg(
   )
 endif()
 
-# Run ASan tests only if we're sure we may produce working binaries.
-set(ASAN_TEST_DEPS
-  ${SANITIZER_COMMON_LIT_TEST_DEPS}
-  asan)
-set(ASAN_TEST_PARAMS
-  asan_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
+set(ASAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
+if(NOT COMPILER_RT_STANDALONE_BUILD)
+  list(APPEND ASAN_TEST_DEPS asan)
+endif()
+
 # FIXME: support unit test in the android test runner
 if(COMPILER_RT_INCLUDE_TESTS AND NOT CAN_TARGET_arm_android)
   list(APPEND ASAN_TEST_DEPS AsanUnitTests)
@@ -59,6 +58,5 @@ if(COMPILER_RT_INCLUDE_TESTS AND NOT CAN
 endif()
 add_lit_testsuite(check-asan "Running the AddressSanitizer tests"
   ${ASAN_TESTSUITES}
-  PARAMS ${ASAN_TEST_PARAMS}
   DEPENDS ${ASAN_TEST_DEPS})
 set_target_properties(check-asan PROPERTIES FOLDER "ASan tests")

Modified: compiler-rt/trunk/test/dfsan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/dfsan/CMakeLists.txt?rev=201771&r1=201770&r2=201771&view=diff
==============================================================================
--- compiler-rt/trunk/test/dfsan/CMakeLists.txt (original)
+++ compiler-rt/trunk/test/dfsan/CMakeLists.txt Thu Feb 20 03:47:18 2014
@@ -4,9 +4,11 @@ configure_lit_site_cfg(
   ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
   ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
 
-set(DFSAN_TEST_DEPS
-  ${SANITIZER_COMMON_LIT_TEST_DEPS}
-  dfsan)
+set(DFSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
+if(NOT COMPILER_RT_STANDALONE_BUILD)
+  list(APPEND DFSAN_TEST_DEPS dfsan)
+endif()
+
 add_lit_testsuite(check-dfsan "Running the DataFlowSanitizer tests"
   ${CMAKE_CURRENT_BINARY_DIR}
   DEPENDS ${DFSAN_TEST_DEPS})

Modified: compiler-rt/trunk/test/lsan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lsan/CMakeLists.txt?rev=201771&r1=201770&r2=201771&view=diff
==============================================================================
--- compiler-rt/trunk/test/lsan/CMakeLists.txt (original)
+++ compiler-rt/trunk/test/lsan/CMakeLists.txt Thu Feb 20 03:47:18 2014
@@ -11,10 +11,10 @@ configure_lit_site_cfg(
   ${CMAKE_CURRENT_BINARY_DIR}/AsanConfig/lit.site.cfg)
 
 if(NOT APPLE AND NOT ANDROID)
-  set(LSAN_TEST_DEPS
-    ${SANITIZER_COMMON_LIT_TEST_DEPS}
-    lsan
-    asan)
+  set(LSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
+  if(NOT COMPILER_RT_STANDALONE_BUILD)
+    list(APPEND LSAN_TEST_DEPS lsan asan)
+  endif()
   add_lit_testsuite(check-lsan "Running the LeakSanitizer tests"
     ${CMAKE_CURRENT_BINARY_DIR}/LsanConfig
     ${CMAKE_CURRENT_BINARY_DIR}/AsanConfig

Modified: compiler-rt/trunk/test/msan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/msan/CMakeLists.txt?rev=201771&r1=201770&r2=201771&view=diff
==============================================================================
--- compiler-rt/trunk/test/msan/CMakeLists.txt (original)
+++ compiler-rt/trunk/test/msan/CMakeLists.txt Thu Feb 20 03:47:18 2014
@@ -4,9 +4,10 @@ configure_lit_site_cfg(
   ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
   ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
 
-set(MSAN_TEST_DEPS
-  ${SANITIZER_COMMON_LIT_TEST_DEPS}
-  msan)
+set(MSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
+if(NOT COMPILER_RT_STANDALONE_BUILD)
+  list(APPEND MSAN_TEST_DEPS msan)
+endif()
 
 if(COMPILER_RT_INCLUDE_TESTS AND COMPILER_RT_HAS_LIBCXX_SOURCES)
   configure_lit_site_cfg(

Modified: compiler-rt/trunk/test/tsan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/CMakeLists.txt?rev=201771&r1=201770&r2=201771&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/CMakeLists.txt (original)
+++ compiler-rt/trunk/test/tsan/CMakeLists.txt Thu Feb 20 03:47:18 2014
@@ -2,9 +2,10 @@ configure_lit_site_cfg(
   ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
   ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
 
-set(TSAN_TEST_DEPS
-  ${SANITIZER_COMMON_LIT_TEST_DEPS}
-  tsan)
+set(TSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
+if(NOT COMPILER_RT_STANDALONE_BUILD)
+  list(APPEND TSAN_TEST_DEPS tsan)
+endif()
 
 if(COMPILER_RT_INCLUDE_TESTS)
   configure_lit_site_cfg(

Modified: compiler-rt/trunk/test/ubsan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/CMakeLists.txt?rev=201771&r1=201770&r2=201771&view=diff
==============================================================================
--- compiler-rt/trunk/test/ubsan/CMakeLists.txt (original)
+++ compiler-rt/trunk/test/ubsan/CMakeLists.txt Thu Feb 20 03:47:18 2014
@@ -10,10 +10,11 @@ configure_lit_site_cfg(
   ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
   ${CMAKE_CURRENT_BINARY_DIR}/AsanConfig/lit.site.cfg)
 
-set(UBSAN_TEST_DEPS
-  ${SANITIZER_COMMON_LIT_TEST_DEPS}
-  ubsan
-  asan)
+set(UBSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
+if(NOT COMPILER_RT_STANDALONE_BUILD)
+  list(APPEND UBSAN_TEST_DEPS ubsan asan)
+endif()
+
 add_lit_testsuite(check-ubsan "Running UndefinedBehaviorSanitizer tests"
   ${CMAKE_CURRENT_BINARY_DIR}/UbsanConfig
   ${CMAKE_CURRENT_BINARY_DIR}/AsanConfig





More information about the llvm-commits mailing list