Skip to content

Clarify lit's definition of failure and conditions when it exits with exit code 1 #136190

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

Merged
merged 2 commits into from
Apr 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions llvm/docs/CommandGuide/lit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ EXECUTION OPTIONS

.. option:: --report-failures-only

Only include unresolved, timed out, failed and unexpectedly passed tests in the report.
Only include failures (see :ref:`test-status-results`) in the report.

.. option:: --resultdb-output RESULTDB_OUTPUT

Expand Down Expand Up @@ -384,8 +384,9 @@ ADDITIONAL OPTIONS
EXIT STATUS
-----------

:program:`lit` will exit with an exit code of 1 if there are any FAIL or XPASS
results. Otherwise, it will exit with the status 0. Other exit codes are used
:program:`lit` will exit with an exit code of 1 if there are any failures
(see :ref:`test-status-results`) and :option:`--ignore-fail` has not been
passed. Otherwise, it will exit with the status 0. Other exit codes are used
for non-test related failures (for example a user error or an internal program
error).

Expand Down Expand Up @@ -461,8 +462,10 @@ Each test ultimately produces one of the following eight results:

**TIMEOUT**

The test was run, but it timed out before it was able to complete. This is
considered a failure.
The test was run, but it timed out before it was able to complete.

Unresolved (**UNRESOLVED**), timed out (**TIMEOUT**), failed (**FAIL**) and
unexpectedly passed (**XPASS**) tests are considered failures.

Depending on the test format tests may produce additional information about
their status (generally only for failures). See the :ref:`output-options`
Expand Down
Loading