From 70dde185c5b35b7a465294e60fd50059f144882b Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Fri, 21 Mar 2014 18:13:35 +0000 Subject: [PATCH] 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@204493 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/lit.cfg | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/test/lit.cfg b/test/lit.cfg index f7acb2f156..8d0ac80ebe 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -288,6 +288,40 @@ 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. +# For example, don't match 'clang-check-' or '.clang-format'. +# Regex assertions to reject neighbor hyphens/dots (seen in some tests). +NoPreHyphenDot = r"(?