[llvm] r313854 - [lit/Win] Check if a path was found before attempting to use it.
David L. Jones via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 20 18:26:16 PDT 2017
Author: dlj
Date: Wed Sep 20 18:26:16 2017
New Revision: 313854
URL: http://llvm.org/viewvc/llvm-project?rev=313854&view=rev
Log:
[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
Modified:
llvm/trunk/utils/lit/lit/llvm/config.py
Modified: llvm/trunk/utils/lit/lit/llvm/config.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/llvm/config.py?rev=313854&r1=313853&r2=313854&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/llvm/config.py (original)
+++ llvm/trunk/utils/lit/lit/llvm/config.py Wed Sep 20 18:26:16 2017
@@ -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
More information about the llvm-commits
mailing list