diff options
author | Michal Gorny <mgorny@gentoo.org> | 2017-10-01 07:13:25 +0000 |
---|---|---|
committer | Michal Gorny <mgorny@gentoo.org> | 2017-10-01 07:13:25 +0000 |
commit | 474d2da27754c6ff906461da6c716cec2948ddad (patch) | |
tree | 4c116496a95e92c1581cfbed6eedfafa9b584269 /utils/lit/tests | |
parent | 61b704697a430ac3172bd04b6930b4aa612bf216 (diff) |
[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
Diffstat (limited to 'utils/lit/tests')
-rw-r--r-- | utils/lit/tests/lit.cfg | 2 |
1 files changed, 1 insertions, 1 deletions
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 |