aboutsummaryrefslogtreecommitdiff
path: root/test/sanitizer_common/lit.common.cfg
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 /test/sanitizer_common/lit.common.cfg
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 'test/sanitizer_common/lit.common.cfg')
-rw-r--r--test/sanitizer_common/lit.common.cfg12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/sanitizer_common/lit.common.cfg b/test/sanitizer_common/lit.common.cfg
index f2d3fec6baa2..7abbfc2d3c3a 100644
--- a/test/sanitizer_common/lit.common.cfg
+++ b/test/sanitizer_common/lit.common.cfg
@@ -5,6 +5,7 @@ config.test_source_root = os.path.join(os.path.dirname(__file__), "TestCases")
config.name = "SanitizerCommon-" + config.tool_name
+default_tool_options = []
if config.tool_name == "asan":
tool_cflags = ["-fsanitize=address"]
tool_options = "ASAN_OPTIONS"
@@ -22,6 +23,15 @@ else:
config.available_features.add(config.tool_name)
+if config.host_os == 'Darwin':
+ # 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'.
+ default_tool_options += ['abort_on_error=0']
+default_tool_options_str = ':'.join(default_tool_options)
+if default_tool_options_str:
+ config.environment[tool_options] = default_tool_options_str
+ default_tool_options_str += ':'
+
clang_cflags = config.debug_info_flags + tool_cflags + [config.target_cflags]
clang_cxxflags = config.cxx_mode_flags + clang_cflags
@@ -32,6 +42,8 @@ config.substitutions.append( ("%clang ", build_invocation(clang_cflags)) )
config.substitutions.append( ("%clangxx ", build_invocation(clang_cxxflags)) )
config.substitutions.append( ("%tool_name", config.tool_name) )
config.substitutions.append( ("%tool_options", tool_options) )
+config.substitutions.append( ('%env_tool_opts=',
+ 'env ' + tool_options + '=' + default_tool_options_str))
config.suffixes = ['.c', '.cc', '.cpp']