summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2014-02-20 12:18:08 +0000
committerAlexey Samsonov <samsonov@google.com>2014-02-20 12:18:08 +0000
commitc7831b17590a6754e3471a995cc56a569318c172 (patch)
tree47afcb39af91fa1f75e131629f5a8f0007e1b3e5 /test
parente20c23ce1585d3b49cbe3c127b88d3ef1bbc7c41 (diff)
Move config for sanitizer_common tests under test/ for consistency
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201779 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt3
-rw-r--r--test/sanitizer_common/CMakeLists.txt9
-rw-r--r--test/sanitizer_common/lit.site.cfg.in15
3 files changed, 27 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 30735d70f..8a0fa2b09 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -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()
diff --git a/test/sanitizer_common/CMakeLists.txt b/test/sanitizer_common/CMakeLists.txt
new file mode 100644
index 000000000..f028be8f2
--- /dev/null
+++ b/test/sanitizer_common/CMakeLists.txt
@@ -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()
diff --git a/test/sanitizer_common/lit.site.cfg.in b/test/sanitizer_common/lit.site.cfg.in
new file mode 100644
index 000000000..260058570
--- /dev/null
+++ b/test/sanitizer_common/lit.site.cfg.in
@@ -0,0 +1,15 @@
+## 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.
+# 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