[Lldb-commits] [lldb] r321932 - [test] Use full PATH lookup for tools

Michal Gorny via lldb-commits lldb-commits at lists.llvm.org
Sat Jan 6 02:20:25 PST 2018


Author: mgorny
Date: Sat Jan  6 02:20:25 2018
New Revision: 321932

URL: http://llvm.org/viewvc/llvm-project?rev=321932&view=rev
Log:
[test] Use full PATH lookup for tools

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.

Differential Revision: https://reviews.llvm.org/D41726

Modified:
    lldb/trunk/lit/lit.cfg

Modified: lldb/trunk/lit/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/lit.cfg?rev=321932&r1=321931&r2=321932&view=diff
==============================================================================
--- lldb/trunk/lit/lit.cfg (original)
+++ lldb/trunk/lit/lit.cfg Sat Jan  6 02:20:25 2018
@@ -91,11 +91,11 @@ for pattern in [r"\bFileCheck\b",
                           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




More information about the lldb-commits mailing list