summaryrefslogtreecommitdiff
path: root/test/asan/Unit
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2014-12-17 23:14:01 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2014-12-17 23:14:01 +0000
commit431f94ddeb10a33af9ce0fd22bda1ff31ae59502 (patch)
treefc53889127b4d654028dc05674073f2aa096f6a7 /test/asan/Unit
parent296f4b520813ea846c3711102bfd33739913000d (diff)
[ASan] Always build shared ASan runtime on Linux.
This commit changes the strategy for building shared ASan runtime and the way we test it: - COMPILER_RT_BUILD_SHARED_ASAN CMake option is removed. We now always build shared ASan runtime (it is the default on Android, Windows and Mac, and not the default on Linux and FreeBSD). - Platforms, which use static runtime by default now have "check-asan-dynamic" testsuite. This testsuite contains instrumented unit tests, and ASan lit tests, and runs them with shared ASan runtime. This testsuite is *not* a part of "check-asan" and *not* a part of "check-all", as adding 1000 more test cases, which duplicate existing ones is costly. However, you're welcome to add this command to your buildbot. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224470 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/asan/Unit')
-rw-r--r--test/asan/Unit/lit.site.cfg.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/asan/Unit/lit.site.cfg.in b/test/asan/Unit/lit.site.cfg.in
index 1791b6b05..a3549758c 100644
--- a/test/asan/Unit/lit.site.cfg.in
+++ b/test/asan/Unit/lit.site.cfg.in
@@ -17,7 +17,13 @@ config.name = 'AddressSanitizer-Unit'
# Setup test source and exec root. For unit tests, we define
# it as build directory with ASan unit tests.
# FIXME: De-hardcode this path.
-config.test_exec_root = "@COMPILER_RT_BINARY_DIR@/lib/asan/tests"
+if @ASAN_TEST_DYNAMIC@:
+ test_dir = "dynamic"
+else:
+ test_dir = "default"
+config.test_exec_root = os.path.join("@COMPILER_RT_BINARY_DIR@",
+ "lib", "asan", "tests", test_dir)
+
config.test_source_root = config.test_exec_root
# Set LD_LIBRARY_PATH to pick dynamic runtime up properly.