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

Joel E. Denny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 12 14:08:42 PST 2021


jdenny added inline comments.


================
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.
----------------
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`?


================
Comment at: llvm/utils/lit/lit/discovery.py:163
         # are being run directly.
         # --no-indirectly-run-check: skips this check.
+        if (
----------------
This comment should probably mention `standalone_tests` as well.


================
Comment at: llvm/utils/lit/lit/discovery.py:177
                 litConfig.error(
                     '%r would not be run indirectly: change name or LIT config'
                     % test.getFullName())
----------------
It would be more helpful if this pointed to the relevant config/command-line option(s).


================
Comment at: llvm/utils/lit/tests/discovery.py:153
+#
+# RUN: %{lit} %{inputs}/standalone-tests/true.txt -j 1
+
----------------
I think the above two should check that a test actually ran.


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