aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-03-26 08:28:18 +0000
committerAlexey Samsonov <samsonov@google.com>2013-03-26 08:28:18 +0000
commit48c08343fa76d51556d069d59f7bc28572b87ccc (patch)
tree007276df3a92aad1ee6622f5cf3bb47c0b1ab6cb
parent42958026f0ea0a163200b1f5ba20238c7102f2e9 (diff)
Add asan/msan to the list of available features in LIT test runner. Mark ASan-unfriendly test as XFAIL.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177995 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/lit.cfg6
-rw-r--r--test/lit.site.cfg.in1
2 files changed, 7 insertions, 0 deletions
diff --git a/test/lit.cfg b/test/lit.cfg
index f7eb7319b9..b3b20c8c4e 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -294,3 +294,9 @@ if llc_props['enable_assertions']:
if lit.util.which('xmllint'):
config.available_features.add('xmllint')
+# Sanitizers.
+if config.llvm_use_sanitizer == "Address":
+ config.available_features.add("asan")
+if (config.llvm_use_sanitizer == "Memory" or
+ config.llvm_use_sanitizer == "MemoryWithOrigins"):
+ config.available_features.add("msan")
diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in
index df90b81055..23eb8e228c 100644
--- a/test/lit.site.cfg.in
+++ b/test/lit.site.cfg.in
@@ -7,6 +7,7 @@ config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.clang_obj_root = "@CLANG_BINARY_DIR@"
config.target_triple = "@TARGET_TRIPLE@"
+config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
# Support substitution of the tools and libs dirs with user parameters. This is
# used when we can't determine the tool dir at configuration time.