diff options
author | Zachary Turner <zturner@google.com> | 2017-11-20 21:41:36 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-11-20 21:41:36 +0000 |
commit | 2f8d9c0b81ea2dbdb7413b6e2b996a5f6ebe6c72 (patch) | |
tree | df50efaf4bf92c3f784a0b05e28197cb1b0d1fdf /utils/lit | |
parent | d2dfb38ff40285f654104169730e91bbde19a7c7 (diff) |
Resubmit "Refactor debuginfo-tests" again.
This was reverted due to the tests being run twice on some
build bots. Each run had a slightly different configuration
due to the way in which it was being invoked. This fixes
the problem (albeit in a somewhat hacky way). Hopefully in
the future we can get rid of the workflow of running
debuginfo-tests as part of clang, and then this hack can
go away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318697 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/lit')
-rw-r--r-- | utils/lit/lit/llvm/config.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/utils/lit/lit/llvm/config.py b/utils/lit/lit/llvm/config.py index c631f8b8865..261f1b3885d 100644 --- a/utils/lit/lit/llvm/config.py +++ b/utils/lit/lit/llvm/config.py @@ -27,8 +27,9 @@ class LLVMConfig(object): # For tests that require Windows to run. features.add('system-windows') + lit_tools_dir = getattr(config, 'lit_tools_dir', None) # Seek sane tools in directories and set to $PATH. - path = self.lit_config.getToolsPath(config.lit_tools_dir, + path = self.lit_config.getToolsPath(lit_tools_dir, config.environment['PATH'], ['cmp.exe', 'grep.exe', 'sed.exe']) if path is not None: @@ -413,8 +414,10 @@ class LLVMConfig(object): self.config.substitutions.append( ('%target_itanium_abi_host_triple', '')) - self.config.substitutions.append( - ('%src_include_dir', self.config.clang_src_dir + '/include')) + clang_src_dir = getattr(self.config, 'clang_src_dir', None) + if clang_src_dir: + self.config.substitutions.append( + ('%src_include_dir', os.path.join(clang_src_dir, 'include'))) # FIXME: Find nicer way to prohibit this. self.config.substitutions.append( |