From: Paul Robinson Date: Wed, 26 Mar 2014 16:40:43 +0000 (+0000) Subject: Recommit r204493 with a fix to look in both clang and llvm directories. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=972fd1d7f0289d95dd78c64a424f130be44ecffe;p=clang Recommit r204493 with a fix to look in both clang and llvm directories. Hopefully addresses r204539. Make clang/test/lit.cfg pre-scan the RUN line looking for tool names, and substitute fully qualified path names pointing to the build directory. This ensures we're testing the just-built tools. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204831 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/lit.cfg b/test/lit.cfg index f7acb2f156..66cec612a3 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -288,6 +288,42 @@ config.substitutions.append( (' %clang-cl ', """*** invalid substitution, use '%clang_cl'. ***""") ) +# For each occurrence of a clang 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. +tool_dirs = os.path.pathsep.join((clang_tools_dir, llvm_tools_dir)) + +# Regex assertions to reject neighbor hyphens/dots (seen in some tests). +# For example, don't match 'clang-check-' or '.clang-format'. +NoPreHyphenDot = r"(?