Skip to content

Commit

Permalink
Merging r321932:
Browse files Browse the repository at this point in the history
------------------------------------------------------------------------
r321932 | mgorny | 2018-01-06 02:20:25 -0800 (Sat, 06 Jan 2018) | 12 lines

[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
------------------------------------------------------------------------

llvm-svn: 322832
  • Loading branch information
zmodem committed Jan 18, 2018
1 parent 134a2c1 commit ab9a56b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lldb/lit/lit.cfg
Expand Up @@ -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
Expand Down

0 comments on commit ab9a56b

Please sign in to comment.