Skip to content

[lit][docs] Mention LIT_OPTS instead of LIT_ARGS #147494

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

one-d-wide
Copy link

Noticed that the current docs 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).

Copy link

github-actions bot commented Jul 8, 2025

Thank you for submitting a Pull Request (PR) to the LLVM Project!

This PR will be automatically labeled and the relevant teams will be notified.

If you wish to, you can add reviewers by using the "Reviewers" section on this page.

If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using @ followed by their GitHub username.

If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers.

If you have further questions, they may be answered by the LLVM GitHub User Guide.

You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums.

@llvmbot
Copy link
Member

llvmbot commented Jul 8, 2025

@llvm/pr-subscribers-testing-tools

Author: Remy Farley (one-d-wide)

Changes

Noticed that the current docs 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 --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:

@one-d-wide
Copy link
Author

CC: @nikic (not sure who else to ping for lit/test-tooling)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants