summaryrefslogtreecommitdiff
path: root/test/asan/lit.cfg
diff options
context:
space:
mode:
authorFrancis Ricci <francisjricci@gmail.com>2017-04-20 21:27:25 +0000
committerFrancis Ricci <francisjricci@gmail.com>2017-04-20 21:27:25 +0000
commit08d91460ea4a2141a1b0051cba4082207c90f992 (patch)
tree3b45335134009bdd0eccd6cd95cc5f69f22c06a7 /test/asan/lit.cfg
parent90b4b2c3c0f6a64a5b793e089c77a906acdf40c3 (diff)
Enable lsan test suite on Darwin x86_64 builds
Reviewers: kubamracek, alekseyshl Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D32191 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@300897 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/asan/lit.cfg')
-rw-r--r--test/asan/lit.cfg9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/asan/lit.cfg b/test/asan/lit.cfg
index 7d684a1ae..0a5a2d2ed 100644
--- a/test/asan/lit.cfg
+++ b/test/asan/lit.cfg
@@ -38,6 +38,11 @@ if config.host_os == 'Darwin':
# Also, make sure we do not overwhelm the syslog while testing.
default_asan_opts = 'abort_on_error=0'
default_asan_opts += ':log_to_syslog=0'
+
+ # On Darwin, leak checking is not enabled by default. Enable for x86_64
+ # tests to prevent regressions
+ if config.target_arch == 'x86_64':
+ default_asan_opts += ':detect_leaks=1'
elif config.android:
# The same as on Darwin, we default to "abort_on_error=1" which slows down
# testing. Also, all existing tests are using "not" instead of "not --crash"
@@ -217,7 +222,9 @@ if re.search('mthumb', config.target_cflags) is not None:
config.available_features.add('fast-unwinder-works')
# Turn on leak detection on 64-bit Linux.
-if config.host_os == 'Linux' and (config.target_arch == 'x86_64' or config.target_arch == 'i386'):
+leak_detection_linux = (config.host_os == 'Linux') and (config.target_arch == 'x86_64' or config.target_arch == 'i386')
+leak_detection_mac = (config.host_os == 'Darwin') and (config.target_arch == 'x86_64')
+if leak_detection_linux or leak_detection_mac:
config.available_features.add('leak-detection')
# Set LD_LIBRARY_PATH to pick dynamic runtime up properly.