[PATCH] D94766: Add lit config for dir with standalone tests

Joel E. Denny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 16 08:55:42 PST 2021


jdenny accepted this revision.
jdenny added a comment.
This revision is now accepted and ready to land.

LGTM except for the one minor change to the diagnostic.  Thanks for all the work.



================
Comment at: llvm/docs/CommandGuide/lit.rst:381
+ **standalone_tests** Mark a directory with tests expected to be run
+ standalone. Test discovery is disabled for that directory and
+ *--no-indirectly-run-check* is in effect.
----------------
thopre wrote:
> jdenny wrote:
> > I assume then that there's no known use case where a test directory sometimes relies on test discovery but also has standalone tests.  It sounds like it's one or the other.
> > 
> > Then should `standalone_tests` complain if `suffixes` or `excludes` is set?
> > 
> > Actually, if `suffixes` isn't set (or is empty or `None`), should that be enough to enable `--no-indirectly-run-check`?  Do we need `standalone_tests`?
> I think a mix of discoverable tests and non discoverable ones is indeed unlikely and also non desirable because then when adding a new tests if it is not discoverable you cannot know whether it was intentional or an error (e.g. suffixes should have been modified to add a new suffix).
> 
> I'm reluctant to use suffixes being unset to disable the indirect check because not setting it might have been an error (i.e. someone creates a new directory, adds tests and a config name but forgets the suffixes). Besides suffixes is not used for all lit format (googletest ignores it).
> Besides suffixes is not used for all lit format (googletest ignores it).

Ah, makes sense.


================
Comment at: llvm/utils/lit/lit/discovery.py:177
                 litConfig.error(
                     '%r would not be run indirectly: change name or LIT config'
                     % test.getFullName())
----------------
jdenny wrote:
> It would be more helpful if this pointed to the relevant config/command-line option(s).
Please also mention `standalone_tests` as it's a lesser known way past this error.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94766



More information about the llvm-commits mailing list