summaryrefslogtreecommitdiffstats
path: root/test/lit.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit.cfg')
-rw-r--r--test/lit.cfg20
1 files changed, 17 insertions, 3 deletions
diff --git a/test/lit.cfg b/test/lit.cfg
index 80f8d5a..6567c6d2 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -8,6 +8,18 @@ import platform
# name: The name of this test suite.
config.name = 'Clang'
+# Tweak PATH for Win32
+if platform.system() == 'Windows':
+ # Seek sane tools in directories and set to $PATH.
+ path = getattr(config, 'lit_tools_dir', None)
+ path = lit.getToolsPath(path,
+ config.environment['PATH'],
+ ['cmp.exe', 'grep.exe', 'sed.exe'])
+ if path is not None:
+ path = os.path.pathsep.join((path,
+ config.environment['PATH']))
+ config.environment['PATH'] = path
+
# testFormat: The test format to use to interpret tests.
#
# For now we require '&&' between commands, until they get globally killed and
@@ -16,7 +28,7 @@ execute_external = platform.system() != 'Windows'
config.test_format = lit.formats.ShTest(execute_external)
# suffixes: A list of file extensions to treat as test files.
-config.suffixes = ['.c', '.cpp', '.m', '.mm']
+config.suffixes = ['.c', '.cpp', '.m', '.mm', '.cu', '.ll', '.cl']
# test_source_root: The root path where tests are located.
config.test_source_root = os.path.dirname(__file__)
@@ -88,7 +100,8 @@ if config.test_exec_root is None:
# Check that the site specific configuration exists.
site_cfg = os.path.join(clang_obj_root, 'test', 'lit.site.cfg')
if not os.path.exists(site_cfg):
- lit.fatal('No site specific configuration available!')
+ lit.fatal('No site specific configuration available! You may need to '
+ 'run "make test" in your Clang build directory.')
# Okay, that worked. Notify the user of the automagic, and reconfigure.
lit.note('using out-of-tree build at %r' % clang_obj_root)
@@ -131,12 +144,13 @@ config.substitutions.append( ('%clang_cc1', config.clang + ' -cc1') )
config.substitutions.append( ('%clangxx', ' ' + config.clang +
' -ccc-clang-cxx -ccc-cxx '))
config.substitutions.append( ('%clang', ' ' + config.clang + ' ') )
+config.substitutions.append( ('%test_debuginfo', ' ' + config.llvm_src_root + '/utils/test_debuginfo.pl ') )
# FIXME: Find nicer way to prohibit this.
config.substitutions.append(
(' clang ', """*** Do not use 'clang' in tests, use '%clang'. ***""") )
config.substitutions.append(
- (' clang++ ', """*** Do not use 'clang++' in tests, use '%clangxx'. ***"""))
+ (' clang\+\+ ', """*** Do not use 'clang++' in tests, use '%clangxx'. ***"""))
config.substitutions.append(
(' clang-cc ',
"""*** Do not use 'clang-cc' in tests, use '%clang_cc1'. ***""") )
OpenPOWER on IntegriCloud