aboutsummaryrefslogtreecommitdiff
path: root/lib/asan/tests/asan_test_main.cc
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-12-30 11:52:19 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-12-30 11:52:19 +0000
commit5c909fa013fc285f010a95e8d387e0ef3412da9c (patch)
tree1059d068ad281f4776ff44cd414574f99a460023 /lib/asan/tests/asan_test_main.cc
parentf31bcc68c72371a2bf63aead9f3373a1ff2053b6 (diff)
downloadsrc-5c909fa013fc285f010a95e8d387e0ef3412da9c.tar.gz
src-5c909fa013fc285f010a95e8d387e0ef3412da9c.zip
Vendor import of compiler-rt trunk r256633:vendor/compiler-rt/compiler-rt-trunk-r256633
Notes
Notes: svn path=/vendor/compiler-rt/dist/; revision=292925 svn path=/vendor/compiler-rt/compiler-rt-trunk-r256633/; revision=292926; tag=vendor/compiler-rt/compiler-rt-trunk-r256633
Diffstat (limited to 'lib/asan/tests/asan_test_main.cc')
-rw-r--r--lib/asan/tests/asan_test_main.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/asan/tests/asan_test_main.cc b/lib/asan/tests/asan_test_main.cc
index 1746c5f4837b..cdaf801d914b 100644
--- a/lib/asan/tests/asan_test_main.cc
+++ b/lib/asan/tests/asan_test_main.cc
@@ -11,6 +11,20 @@
//
//===----------------------------------------------------------------------===//
#include "asan_test_utils.h"
+#include "sanitizer_common/sanitizer_platform.h"
+
+// Default ASAN_OPTIONS for the unit tests. Let's turn symbolication off to
+// speed up testing (unit tests don't use it anyway).
+extern "C" const char* __asan_default_options() {
+#if SANITIZER_MAC
+ // On Darwin, we default to `abort_on_error=1`, which would make tests run
+ // much slower. Let's override this and run lit tests with 'abort_on_error=0'.
+ // Also, make sure we do not overwhelm the syslog while testing.
+ return "symbolize=false:abort_on_error=0:log_to_syslog=0";
+#else
+ return "symbolize=false";
+#endif
+}
int main(int argc, char **argv) {
testing::GTEST_FLAG(death_test_style) = "threadsafe";