[llvm] [lit][docs] Mention LIT_OPTS instead of LIT_ARGS (PR #147494)
Remy Farley via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 8 02:29:51 PDT 2025
https://github.com/one-d-wide created https://github.com/llvm/llvm-project/pull/147494
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).
>From 2757912c600865d63abc68d68f8f7e9482d49d35 Mon Sep 17 00:00:00 2001
From: "Remy D. Farley" <one-d-wide at protonmail.com>
Date: Tue, 8 Jul 2025 09:12:11 +0000
Subject: [PATCH] [lit][docs] Mention LIT_OPTS instead of LIT_ARGS
---
llvm/docs/TestingGuide.rst | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
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:
More information about the llvm-commits
mailing list