diff options
author | David Greene <greened@obbligato.org> | 2011-01-03 17:30:25 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2011-01-03 17:30:25 +0000 |
commit | 18d49877530c04dd63578e6d9d0a1d3b6955502b (patch) | |
tree | 9adf671ef89f86262139d5e978912f065dc9cc6e /test/lit.cfg | |
parent | 0895db0abfd194722706ee561b78c8f71a2b9ee8 (diff) | |
download | external_llvm-18d49877530c04dd63578e6d9d0a1d3b6955502b.zip external_llvm-18d49877530c04dd63578e6d9d0a1d3b6955502b.tar.gz external_llvm-18d49877530c04dd63578e6d9d0a1d3b6955502b.tar.bz2 |
Reapply 122341 to fix PR8199 now that clang changes are in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122754 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/lit.cfg')
-rw-r--r-- | test/lit.cfg | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/test/lit.cfg b/test/lit.cfg index 98f7209..7df2702 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -4,6 +4,7 @@ import os import sys +import re # name: The name of this test suite. config.name = 'LLVM' @@ -148,6 +149,44 @@ for sub in ['llvmgcc', 'llvmgxx', 'emitir', 'compile_cxx', 'compile_c', else: config.substitutions.append(('%' + sub, site_exp[sub])) +# For each occurrence of an llvm tool name as its own word, replace it +# with the full path to the build directory holding that tool. This +# ensures that we are testing the tools just built and not some random +# tools that might happen to be in the user's PATH. Thus this list +# includes every tool placed in $(LLVM_OBJ_ROOT)/$(BuildMode)/bin +# (llvm_tools_dir in lit parlance). + # Don't match 'bugpoint-'. +for pattern in [r"\bbugpoint\b(?!-)", r"\bclang\b", + r"\bedis\b", r"\bgold\b", + r"\bllc\b", r"\blli\b", + r"\bllvm-ar\b", r"\bllvm-as\b", + r"\bllvm-bcanalyzer\b", r"\bllvm-config\b", + r"\bllvm-diff\b", r"\bllvm-dis\b", + r"\bllvm-extract\b", r"\bllvm-ld\b", + r"\bllvm-link\b", r"\bllvm-mc\b", + r"\bllvm-nm\b", r"\bllvm-prof\b", + r"\bllvm-ranlib\b", r"\bllvm-shlib\b", + r"\bllvm-stub\b", r"\bllvm2cpp\b", + # Don't match '-llvmc'. + r"(?<!-)\bllvmc\b", r"\blto\b", + # Don't match '.opt', '-opt' + # or '^opt'. + r"\bmacho-dump\b", r"(?<!\.|-|\^)\bopt\b", + r"\btblgen\b", r"\bFileCheck\b", + r"\bFileUpdate\b", r"\bc-index-test\b", + r"\bfpcmp\b", r"\bllvm-PerfectShuffle\b", + # Handle these specially as they are strings searched + # for during testing. + r"\| \bcount\b", r"\| \bnot\b"]: + # Extract the tool name from the pattern. This relies on the tool + # name being surrounded by \b word match operators. If the + # pattern starts with "| ", include it in the string to be + # substituted. + substitution = re.sub(r"^(\\)?((\| )?)\W+b([0-9A-Za-z-_]+)\\b\W*$", + r"\2" + llvm_tools_dir + "/" + r"\4", + pattern) + config.substitutions.append((pattern, substitution)) + excludes = [] # Provide target_triple for use in XFAIL and XTARGET. |