[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
This commit is contained in:
David L. Jones 2017-09-21 01:26:16 +00:00
parent 18dd9e88ed
commit e85a0eca21
1 changed files with 2 additions and 1 deletions

View File

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