diff options
author | David L. Jones <dlj@google.com> | 2017-09-21 01:26:16 +0000 |
---|---|---|
committer | David L. Jones <dlj@google.com> | 2017-09-21 01:26:16 +0000 |
commit | e85a0eca212f6d6d8fdbf04b548bea37102612de (patch) | |
tree | b071d3550593c36f31be5d1fd60328a2e8629fec /llvm/utils/lit | |
parent | 18dd9e88ed10c380e8d9cc999854c6365f3908c1 (diff) | |
download | bcm5719-llvm-e85a0eca212f6d6d8fdbf04b548bea37102612de.tar.gz bcm5719-llvm-e85a0eca212f6d6d8fdbf04b548bea37102612de.zip |
[lit/Win] Check if a path was found before attempting to use it.
Summary:
This appears to break some bots, when getToolsPath fails to find some or
all of the tools (for example, an incomplete GnuWin32 installation).
Reviewers: zturner, modocache
Subscribers: sanjoy, llvm-commits
Differential Revision: https://reviews.llvm.org/D38115
llvm-svn: 313854
Diffstat (limited to 'llvm/utils/lit')
-rw-r--r-- | llvm/utils/lit/lit/llvm/config.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/utils/lit/lit/llvm/config.py b/llvm/utils/lit/lit/llvm/config.py index d1f368d0d83..d2db46135ad 100644 --- a/llvm/utils/lit/lit/llvm/config.py +++ b/llvm/utils/lit/lit/llvm/config.py @@ -27,7 +27,8 @@ class LLVMConfig(object): path = self.lit_config.getToolsPath(config.lit_tools_dir, config.environment['PATH'], ['cmp.exe', 'grep.exe', 'sed.exe']) - self.with_environment('PATH', path, append_path=True) + if path is not None: + self.with_environment('PATH', path, append_path=True) self.use_lit_shell = True # Choose between lit's internal shell pipeline runner and a real shell. If |