summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2017-02-15 19:01:37 +0000
committerHans Wennborg <hans@hanshq.net>2017-02-15 19:01:37 +0000
commit31cead58a46abc5a7983491089ffea1de3e09e17 (patch)
tree5f2d46a5f47e73c501700ea33c79453a6ded149c
parentedf740107c309f7ff21b0720bb5f53be250ec13d (diff)
downloadcompiler-rt-31cead58a46abc5a7983491089ffea1de3e09e17.tar.gz
Merging r294425:
------------------------------------------------------------------------ r294425 | mgorny | 2017-02-08 00:43:44 -0800 (Wed, 08 Feb 2017) | 3 lines [test] Enable the strace_test only if strace is installed Differential Revision: https://reviews.llvm.org/D29628 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_40@295216 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/lsan/TestCases/strace_test.cc1
-rw-r--r--test/lsan/lit.common.cfg5
2 files changed, 6 insertions, 0 deletions
diff --git a/test/lsan/TestCases/strace_test.cc b/test/lsan/TestCases/strace_test.cc
index b3568d0b4..b25e05753 100644
--- a/test/lsan/TestCases/strace_test.cc
+++ b/test/lsan/TestCases/strace_test.cc
@@ -1,4 +1,5 @@
// Test that lsan reports a proper error when running under strace.
+// REQUIRES: strace
// RUN: %clangxx_lsan %s -o %t
// RUN: not strace -o /dev/null %run %t 2>&1 | FileCheck %s
diff --git a/test/lsan/lit.common.cfg b/test/lsan/lit.common.cfg
index 6002e2d69..8580eec33 100644
--- a/test/lsan/lit.common.cfg
+++ b/test/lsan/lit.common.cfg
@@ -4,6 +4,8 @@
import os
+import lit.util
+
def get_required_attr(config, attr_name):
attr_value = getattr(config, attr_name, None)
if attr_value == None:
@@ -29,6 +31,9 @@ else:
lit_config.fatal("Unknown LSan test mode: %r" % lsan_lit_test_mode)
config.name += config.name_suffix
+if lit.util.which('strace'):
+ config.available_features.add('strace')
+
clang_cflags = ["-O0", config.target_cflags] + config.debug_info_flags
clang_cxxflags = config.cxx_mode_flags + clang_cflags
lsan_incdir = config.test_source_root + "/../"