[llvm] r314620 - [lit] Fix running lit tests in unconfigured source dir
Michal Gorny via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 1 00:13:25 PDT 2017
Author: mgorny
Date: Sun Oct 1 00:13:25 2017
New Revision: 314620
URL: http://llvm.org/viewvc/llvm-project?rev=314620&view=rev
Log:
[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
Modified:
llvm/trunk/utils/lit/tests/lit.cfg
Modified: llvm/trunk/utils/lit/tests/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/tests/lit.cfg?rev=314620&r1=314619&r2=314620&view=diff
==============================================================================
--- llvm/trunk/utils/lit/tests/lit.cfg (original)
+++ llvm/trunk/utils/lit/tests/lit.cfg Sun Oct 1 00:13:25 2017
@@ -65,6 +65,6 @@ if sys.platform.startswith('win') or sys
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
More information about the llvm-commits
mailing list