[compiler-rt] r201779 - Move config for sanitizer_common tests under test/ for consistency

Alexey Samsonov samsonov at google.com
Thu Feb 20 04:18:09 PST 2014


Author: samsonov
Date: Thu Feb 20 06:18:08 2014
New Revision: 201779

URL: http://llvm.org/viewvc/llvm-project?rev=201779&view=rev
Log:
Move config for sanitizer_common tests under test/ for consistency

Added:
    compiler-rt/trunk/test/sanitizer_common/
    compiler-rt/trunk/test/sanitizer_common/CMakeLists.txt
    compiler-rt/trunk/test/sanitizer_common/lit.site.cfg.in
      - copied, changed from r201769, compiler-rt/trunk/lib/sanitizer_common/tests/lit.site.cfg.in
Removed:
    compiler-rt/trunk/lib/sanitizer_common/tests/lit.site.cfg.in
Modified:
    compiler-rt/trunk/lib/sanitizer_common/tests/CMakeLists.txt
    compiler-rt/trunk/test/CMakeLists.txt

Modified: compiler-rt/trunk/lib/sanitizer_common/tests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/tests/CMakeLists.txt?rev=201779&r1=201778&r2=201779&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/tests/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/sanitizer_common/tests/CMakeLists.txt Thu Feb 20 06:18:08 2014
@@ -143,18 +143,6 @@ if(COMPILER_RT_CAN_EXECUTE_TESTS)
   if(CAN_TARGET_i386)
     add_sanitizer_tests_for_arch(i386)
   endif()
-
-  # Run unittests as a part of lit testsuite.
-  configure_lit_site_cfg(
-    ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
-    ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
-    )
-
-  add_lit_testsuite(check-sanitizer "Running sanitizer library unittests"
-    ${CMAKE_CURRENT_BINARY_DIR}
-    DEPENDS SanitizerUnitTests
-    )
-  set_target_properties(check-sanitizer PROPERTIES FOLDER "Sanitizer unittests")
 endif()
 
 if(ANDROID)

Removed: compiler-rt/trunk/lib/sanitizer_common/tests/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/tests/lit.site.cfg.in?rev=201778&view=auto
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/tests/lit.site.cfg.in (original)
+++ compiler-rt/trunk/lib/sanitizer_common/tests/lit.site.cfg.in (removed)
@@ -1,14 +0,0 @@
-## Autogenerated by LLVM/Clang configuration.
-# Do not edit!
-
-# Load common config for all compiler-rt unit tests.
-lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/unittests/lit.common.unit.configured")
-
-# Setup config name.
-config.name = 'SanitizerCommon-Unit'
-
-# Setup test source and exec root. For unit tests, we define
-# it as build directory with sanitizer_common tests.
-config.test_exec_root = os.path.join("@COMPILER_RT_BINARY_DIR@", "lib",
-                                     "sanitizer_common", "tests")
-config.test_source_root = config.test_exec_root

Modified: compiler-rt/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/CMakeLists.txt?rev=201779&r1=201778&r2=201779&view=diff
==============================================================================
--- compiler-rt/trunk/test/CMakeLists.txt (original)
+++ compiler-rt/trunk/test/CMakeLists.txt Thu Feb 20 06:18:08 2014
@@ -36,6 +36,9 @@ if(COMPILER_RT_CAN_EXECUTE_TESTS)
   if(MSAN_SUPPORTED_ARCH)
     add_subdirectory(msan)
   endif()
+  if(SANITIZER_COMMON_SUPPORTED_ARCH)
+    add_subdirectory(sanitizer_common)
+  endif()
   if(TSAN_SUPPORTED_ARCH)
     add_subdirectory(tsan)
   endif()

Added: compiler-rt/trunk/test/sanitizer_common/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/CMakeLists.txt?rev=201779&view=auto
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/CMakeLists.txt (added)
+++ compiler-rt/trunk/test/sanitizer_common/CMakeLists.txt Thu Feb 20 06:18:08 2014
@@ -0,0 +1,9 @@
+if(COMPILER_RT_INCLUDE_TESTS)
+  configure_lit_site_cfg(
+    ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
+    ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg)
+  add_lit_testsuite(check-sanitizer "Running sanitizer library unittests"
+    ${CMAKE_CURRENT_BINARY_DIR}
+    DEPENDS SanitizerUnitTests)
+  set_target_properties(check-sanitizer PROPERTIES FOLDER "Sanitizer unittests")
+endif()

Copied: compiler-rt/trunk/test/sanitizer_common/lit.site.cfg.in (from r201769, compiler-rt/trunk/lib/sanitizer_common/tests/lit.site.cfg.in)
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/lit.site.cfg.in?p2=compiler-rt/trunk/test/sanitizer_common/lit.site.cfg.in&p1=compiler-rt/trunk/lib/sanitizer_common/tests/lit.site.cfg.in&r1=201769&r2=201779&rev=201779&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/tests/lit.site.cfg.in (original)
+++ compiler-rt/trunk/test/sanitizer_common/lit.site.cfg.in Thu Feb 20 06:18:08 2014
@@ -9,6 +9,7 @@ config.name = 'SanitizerCommon-Unit'
 
 # Setup test source and exec root. For unit tests, we define
 # it as build directory with sanitizer_common tests.
+# FIXME: De-hardcode this path.
 config.test_exec_root = os.path.join("@COMPILER_RT_BINARY_DIR@", "lib",
                                      "sanitizer_common", "tests")
 config.test_source_root = config.test_exec_root





More information about the llvm-commits mailing list