summaryrefslogtreecommitdiffstats
path: root/test/lit.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit.cfg')
-rw-r--r--test/lit.cfg24
1 files changed, 23 insertions, 1 deletions
diff --git a/test/lit.cfg b/test/lit.cfg
index e91e660..4466f0f 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -83,7 +83,6 @@ if clang_obj_root is not None:
lit.fatal('No LLVM tools dir set!')
path = os.path.pathsep.join((llvm_tools_dir, config.environment['PATH']))
config.environment['PATH'] = path
-
llvm_libs_dir = getattr(config, 'llvm_libs_dir', None)
if not llvm_libs_dir:
lit.fatal('No LLVM libs dir set!')
@@ -91,6 +90,11 @@ if clang_obj_root is not None:
config.environment.get('LD_LIBRARY_PATH','')))
config.environment['LD_LIBRARY_PATH'] = path
+# Propagate path to symbolizer for ASan/MSan.
+for symbolizer in ['ASAN_SYMBOLIZER_PATH', 'MSAN_SYMBOLIZER_PATH']:
+ if symbolizer in os.environ:
+ config.environment[symbolizer] = os.environ[symbolizer]
+
###
# Check that the object root is known.
@@ -218,6 +222,10 @@ if platform.system() not in ['FreeBSD']:
if platform.system() not in ['Windows'] or lit.getBashPath() != '':
config.available_features.add('shell')
+# Exclude MSYS due to transforming '/' to 'X:/mingwroot/'.
+if not platform.system() in ['Windows'] or lit.getBashPath() == '':
+ config.available_features.add('shell-preserves-root')
+
# For tests that require Darwin to run.
if platform.system() in ['Darwin']:
config.available_features.add('system-darwin')
@@ -237,10 +245,18 @@ def is_filesystem_case_insensitive():
if is_filesystem_case_insensitive():
config.available_features.add('case-insensitive-filesystem')
+# Tests that require the /dev/fd filesystem.
+if os.path.exists("/dev/fd/0") and sys.platform not in ['cygwin']:
+ config.available_features.add('dev-fd-fs')
+
# [PR8833] LLP64-incompatible tests
if not re.match(r'^x86_64.*-(win32|mingw32)$', config.target_triple):
config.available_features.add('LP64')
+# [PR12920] "clang-driver" -- set if gcc driver is not used.
+if not re.match(r'.*-(cygwin|mingw32)$', config.target_triple):
+ config.available_features.add('clang-driver')
+
# Registered Targets
def get_llc_props(tool):
set_of_targets = set()
@@ -278,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")
OpenPOWER on IntegriCloud