[llvm] [lit][docs] Mention LIT_OPTS instead of LIT_ARGS (PR #147494)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 8 02:30:43 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-testing-tools

Author: Remy Farley (one-d-wide)

<details>
<summary>Changes</summary>

Noticed that the current [docs](https://llvm.org/docs/TestingGuide.html#unit-and-regression-tests) recommend using LIT_ARGS (config option in cmake script), rather than LIT_OPTS (environment variable interpreted by lit directly). While LIT_ARGS doesn't do anything at all when set with make, at least not in a way outlined in the docs.

Additionally documented a way to skip dependency checks when invoking lit tests using make (for faster evaluation).

---
Full diff: https://github.com/llvm/llvm-project/pull/147494.diff


1 Files Affected:

- (modified) llvm/docs/TestingGuide.rst (+11-2) 


``````````diff
diff --git a/llvm/docs/TestingGuide.rst b/llvm/docs/TestingGuide.rst
index b6dda6a732405..3648986ac6692 100644
--- a/llvm/docs/TestingGuide.rst
+++ b/llvm/docs/TestingGuide.rst
@@ -152,15 +152,24 @@ can run the LLVM and Clang tests simultaneously using:
 
     % make check-all
 
-To run the tests with Valgrind (Memcheck by default), use the ``LIT_ARGS`` make
+To run the tests with Valgrind (Memcheck by default), use the ``LIT_OPTS`` make
 variable to pass the required options to lit. For example, you can use:
 
 .. code-block:: bash
 
-    % make check LIT_ARGS="-v --vg --vg-leak"
+    % make check LIT_OPTS="-v --vg --vg-leak"
 
 to enable testing with valgrind and with leak checking enabled.
 
+To skip the evaluation of dependencies when iterating on tests, add suffix /fast
+(automatically generated by cmake) to the make target, i.e.
+
+.. code-block:: bash
+
+    % make check/fast LIT_OPTS="--filter <...>"
+
+note that this way no changes to source files, besides tests, will be picked up.
+
 To run individual tests or subsets of tests, you can use the ``llvm-lit``
 script which is built as part of LLVM. For example, to run the
 ``Integer/BitPacked.ll`` test by itself you can run:

``````````

</details>


https://github.com/llvm/llvm-project/pull/147494


More information about the llvm-commits mailing list