From 474d2da27754c6ff906461da6c716cec2948ddad Mon Sep 17 00:00:00 2001 From: Michal Gorny Date: Sun, 1 Oct 2017 07:13:25 +0000 Subject: [PATCH] [lit] Fix running lit tests in unconfigured source dir Fix llvm_tools_dir attribute access not to fail when the variable is not present. This directory is not really necessary to run lit tests, and the code already accounts for it being None. The reference was added in r313407, and it breaks the stand-alone lit package in Gentoo. Differential Revision: https://reviews.llvm.org/D38442 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314620 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/lit/tests/lit.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/lit/tests/lit.cfg b/utils/lit/tests/lit.cfg index f2ecaa6d417..dffaec6584b 100644 --- a/utils/lit/tests/lit.cfg +++ b/utils/lit/tests/lit.cfg @@ -65,6 +65,6 @@ if sys.platform.startswith('win') or sys.platform.startswith('cygwin'): config.available_features.add('windows') # Add llvm tools directory if this config is being loaded indirectly -if config.llvm_tools_dir is not None: +if getattr(config, 'llvm_tools_dir', None) is not None: path = os.path.pathsep.join((config.llvm_tools_dir, config.environment['PATH'])) config.environment['PATH'] = path -- 2.49.0