summaryrefslogtreecommitdiff
path: root/test/lit.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit.cfg')
-rw-r--r--test/lit.cfg29
1 files changed, 22 insertions, 7 deletions
diff --git a/test/lit.cfg b/test/lit.cfg
index 7bc9620926fae..e91e66052e273 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -4,6 +4,7 @@ import os
import platform
import re
import subprocess
+import tempfile
# Configuration file for the 'lit' test runner.
@@ -165,11 +166,6 @@ def inferClang(PATH):
return clang
-# When running under valgrind, we mangle '-vg' onto the end of the triple so we
-# can check it with XFAIL and XTARGET.
-if lit.useValgrind:
- config.target_triple += '-vg'
-
config.clang = inferClang(config.environment['PATH']).replace('\\', '/')
if not lit.quiet:
lit.note('using clang: %r' % config.clang)
@@ -191,7 +187,7 @@ config.substitutions.append( ('%clang_cc1', '%s -cc1 -internal-isystem %s'
getClangBuiltinIncludeDir(config.clang))) )
config.substitutions.append( ('%clangxx', ' ' + config.clang +
- ' -ccc-clang-cxx -ccc-cxx '))
+ ' -ccc-cxx '))
config.substitutions.append( ('%clang', ' ' + config.clang + ' ') )
config.substitutions.append( ('%test_debuginfo', ' ' + config.llvm_src_root + '/utils/test_debuginfo.pl ') )
@@ -222,10 +218,29 @@ if platform.system() not in ['FreeBSD']:
if platform.system() not in ['Windows'] or lit.getBashPath() != '':
config.available_features.add('shell')
-# ANSI escape sequences in non-dump terminal
+# For tests that require Darwin to run.
+if platform.system() in ['Darwin']:
+ config.available_features.add('system-darwin')
+
+# ANSI escape sequences in non-dumb terminal
if platform.system() not in ['Windows']:
config.available_features.add('ansi-escape-sequences')
+# Case-insensitive file system
+def is_filesystem_case_insensitive():
+ handle, path = tempfile.mkstemp(prefix='case-test', dir=config.test_exec_root)
+ isInsensitive = os.path.exists(path.upper())
+ os.close(handle)
+ os.remove(path)
+ return isInsensitive
+
+if is_filesystem_case_insensitive():
+ config.available_features.add('case-insensitive-filesystem')
+
+# [PR8833] LLP64-incompatible tests
+if not re.match(r'^x86_64.*-(win32|mingw32)$', config.target_triple):
+ config.available_features.add('LP64')
+
# Registered Targets
def get_llc_props(tool):
set_of_targets = set()