[PATCH] D38442: [lit] Fix running lit tests in unconfigured source dir
    Michał Górny via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Sat Sep 30 14:17:58 PDT 2017
    
    
  
mgorny created this revision.
Herald added a reviewer: modocache.
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 https://reviews.llvm.org/rL313407, and it breaks the stand-alone lit
package in Gentoo.
Repository:
  rL LLVM
https://reviews.llvm.org/D38442
Files:
  utils/lit/tests/lit.cfg
Index: utils/lit/tests/lit.cfg
===================================================================
--- utils/lit/tests/lit.cfg
+++ utils/lit/tests/lit.cfg
@@ -65,6 +65,6 @@
     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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38442.117263.patch
Type: text/x-patch
Size: 512 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170930/e5792218/attachment.bin>
    
    
More information about the llvm-commits
mailing list