[PATCH] D107162: [lit] Have REQUIRES support the target triple
    Dan Liew via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Aug  5 11:48:46 PDT 2021
    
    
  
delcypher added inline comments.
================
Comment at: llvm/utils/lit/tests/Inputs/xunit-output/lit.cfg:10
 config.test_exec_root = None
-config.target_triple = None
+config.target_triple = ''
----------------
probinson wrote:
> jdenny wrote:
> > Why does this need to change?
> Because the test execution goes through the REQUIRES path, and the target_triple check gets a Python error if it's `None` (says something like "not iterable").  
To avoid breaking any existing test suite that sets `config.target_triple` to `None` we could do this.
```lang=python
   def getMissingRequiredFeaturesFromList(self, features):
        triple = getattr(self.suite.config, 'target_triple', "")
        if triple is None:
          triple = ''
        try:
```
However `getUnsupportedFeatures()` doesn't do this currently so that would be a bit inconsistent.
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107162/new/
https://reviews.llvm.org/D107162
    
    
More information about the llvm-commits
mailing list