[Lldb-commits] [PATCH] D41726: [test] Use full PATH lookup for tools

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 4 05:58:28 PST 2018


mgorny created this revision.
mgorny added reviewers: labath, zturner.

Use full PATH when looking up test tools rather than just llvm tools
directory. r320813 has added a lookup for 'lldb-test' which is part
of LLDB tools rather than LLVM, and therefore is not present
in llvm_tools_dir before LLDB is installed.

While technically we could introduce separate per-directory lookup
logic, there is no real reason not to use the PATH formed earlier here,
and this is what other tools are doing.


https://reviews.llvm.org/D41726

Files:
  lit/lit.cfg


Index: lit/lit.cfg
===================================================================
--- lit/lit.cfg
+++ lit/lit.cfg
@@ -91,11 +91,11 @@
                           pattern)
     tool_pipe = tool_match.group(2)
     tool_name = tool_match.group(4)
-    tool_path = lit.util.which(tool_name, config.llvm_tools_dir)
+    tool_path = lit.util.which(tool_name, config.environment['PATH'])
     if not tool_path:
         # Warn, but still provide a substitution.
         lit_config.note(
-            'Did not find ' + tool_name + ' in ' + config.llvm_tools_dir)
+            'Did not find ' + tool_name + ' in ' + config.environment['PATH'])
     config.substitutions.append((pattern, tool_pipe + tool_path))
 
 # Shell execution


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41726.128609.patch
Type: text/x-patch
Size: 729 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180104/32eeb8f4/attachment.bin>


More information about the lldb-commits mailing list