[PATCH] D151664: [lit] Add a method to lit.TestFormat to get the list of tests associated to a path

Louis Dionne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 21 13:29:20 PDT 2023


ldionne added subscribers: thopre, bd1976llvm.
ldionne added a comment.

CC @bd1976llvm @thopre  This is also related to D83069 <https://reviews.llvm.org/D83069> and D94766 <https://reviews.llvm.org/D94766>. Specifically, after my patch, executing a test like

  lit Inputs/standalone-tests/true.txt

using a config that doesn't mention `.txt` as a valid suffix would now result in the following warning:

  lit.py: foo.py: warning: input 'Inputs/standalone-tests/true.txt' contained no tests

IMO this makes sense, and in fact I don't quite understand the motivation behind trying to allow running a test for which the config doesn't have a suffix configured. The original problem that D83069 <https://reviews.llvm.org/D83069> was trying to solve remains solved after this patch, however: if you add a test with an invalid suffix and you try running it directly, Lit will not run it, it will complain that you're trying to run a path that "contains no tests". This seems to address the original issue that prompted D83069 <https://reviews.llvm.org/D83069>.

So I'd be inclined to basically remove the check that had been added by D83069 <https://reviews.llvm.org/D83069> and the `--no-indirectly-run-check` flag (reading the reviews, it seems like this was perceived kind of as a hack anyway), and then we'd want to understand whether the "standalone test" use case truly requires being able to run arbitrary extensions that are not in the configured suffixes.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151664



More information about the llvm-commits mailing list