[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:33:19 PDT 2021


delcypher added a comment.

@jdenny

> In any hypothetical test suite, this patch can only expand the number of tests that run because it enables REQUIRES to be more easily satisfied (by the current target triple). It is impossible for this patch to reduce the number of tests that run.

That is a good point and sometime I missed the first time I looked over this patch. Overly broad matching would mostly be a problem for the `UNSUPPORTED` declaration which we are already doing. So I withdraw my objections to this patch.

I also took a quick look at the regex support in lit. Looks like the current implementation doesn't actually support regexes for target triples based on the tests we have. So it can't be used as alternative right now.

  I'd still like to see support for substring matching on target triples completely removed but I don't think we should do that until we have a viable replacement for it.
          # When matching against the triple, a regex is treated as an identifier and checked
          # for a literal match. This preserves existing behavior before regexes were introduced.
          self.assertFalse(BooleanExpression.evaluate('arch-{{vendor}}-os', {}, triple))
          self.assertTrue(BooleanExpression.evaluate('arch-{{vendor}}-os', {}, 'arch-{{vendor}}-os'))


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107162/new/

https://reviews.llvm.org/D107162



More information about the llvm-commits mailing list