[lld] r255378 - [lld] Watch out for tool names inside paths when substituting tool-paths in lit.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 11 14:09:04 PST 2015


Author: lhames
Date: Fri Dec 11 16:09:03 2015
New Revision: 255378

URL: http://llvm.org/viewvc/llvm-project?rev=255378&view=rev
Log:
[lld] Watch out for tool names inside paths when substituting tool-paths in lit.

If we don't filter these out we can end up, generating bogus paths, for example:
/home/user/lld/build/bin -> /home/user/home/user/lld/build/bin/lld/build/bin.


Modified:
    lld/trunk/test/lit.cfg

Modified: lld/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/lit.cfg?rev=255378&r1=255377&r2=255378&view=diff
==============================================================================
--- lld/trunk/test/lit.cfg (original)
+++ lld/trunk/test/lit.cfg Fri Dec 11 16:09:03 2015
@@ -147,12 +147,12 @@ if config.test_exec_root is None:
 # Regex assertions to reject neighbor hyphens/dots (seen in some tests).
 # For example, we want to prefix 'lld' and 'ld.lld' but not the 'lld' inside
 # of 'ld.lld'.
-NoPreHyphenDot = r"(?<!(-|\.))"
-NoPostHyphenDot = r"(?!(-|\.))"
+NoPreJunk = r"(?<!(-|\.|/))"
+NoPostJunk = r"(?!(-|\.))"
 
 tool_patterns = [r"\bFileCheck\b",
                  r"\bnot\b",
-                 NoPreHyphenDot + r"\blld\b" + NoPostHyphenDot,
+                 NoPreJunk + r"\blld\b" + NoPostJunk,
                  r"\bld.lld\b",
                  r"\blld-link\b",
                  r"\bllvm-mc\b",




More information about the llvm-commits mailing list