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 | 07f3fba3164317b7564e351ab4a78f0056f31785 (patch) | |
tree | 7bb0fdc446a0a63d95b4f5153dfd1e39f3fd13b9 /utils/lit | |
parent | 3d39fc262434a48c12f5e9c06d7b144a0b19767d (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313854 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/lit')
-rw-r--r-- | utils/lit/lit/llvm/config.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/lit/lit/llvm/config.py b/utils/lit/lit/llvm/config.py index d1f368d0d83..d2db46135ad 100644 --- a/utils/lit/lit/llvm/config.py +++ b/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 |