[PATCH] D96594: [lit] Add "early_tests" config option

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 16 01:34:15 PST 2021


jhenderson added a comment.

Essentially looks good, aside from a few small things.

It would be nice if this option could be configured within the test itself, perhaps in a similar manner to how REQUIRES etc works. This would allow the test properties (i.e. something like "I'm slow") to be encoded within the test itself. It would also be nice if there were a lit command-line option to achieve the same thing - in some cases, people might want to see specific tests run early (because for example they are more likely to fail, so want to be observed early) without wanting to modify the testsuite. I'm happy for these to be separate patches.



================
Comment at: llvm/utils/lit/lit/TestingConfig.py:127
         self.is_early = bool(is_early)
+        # List of slowest tests to run early.
+        self.early_tests = {}
----------------
There might be other reasons to run specific tests first (e.g. ones that are more likely to fail), so make this comment less specific.


================
Comment at: llvm/utils/lit/tests/Inputs/early-tests/lit.cfg:7
+config.test_exec_root = None
+config.early_tests = { "test2.txt" }
----------------
I think we need to exercise the '/' separator behaviour as part of this test somehow.


================
Comment at: llvm/utils/lit/tests/early-tests.py:1
+# Check that we can run tests early.
+
----------------
Something I've been encouraging in newer tests is to use `##` for comments (or equivalent e.g. `;;`) to make true comments stand out from lit and FileCheck directives.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96594



More information about the llvm-commits mailing list