[llvm] Clarify conditions of `lit` exiting with exit code 1 (PR #136190)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 17 13:13:57 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-testing-tools
Author: None (i-ky)
<details>
<summary>Changes</summary>
Documentation of when `lit` exits with code is out of date.
It is no longer just "FAIL or XPASS", there are more failure types:
https://github.com/llvm/llvm-project/blob/b30100b87f24847afd6407b4939a184ebcf16ef9/llvm/utils/lit/lit/Test.py#L51-L55
Exit code can also be affected by `--ignore-fail` option:
https://github.com/llvm/llvm-project/blob/b30100b87f24847afd6407b4939a184ebcf16ef9/llvm/utils/lit/lit/main.py#L154-L162
---
Full diff: https://github.com/llvm/llvm-project/pull/136190.diff
1 Files Affected:
- (modified) llvm/docs/CommandGuide/lit.rst (+4-2)
``````````diff
diff --git a/llvm/docs/CommandGuide/lit.rst b/llvm/docs/CommandGuide/lit.rst
index 812e1d819e9c8..6cb1ee4627254 100644
--- a/llvm/docs/CommandGuide/lit.rst
+++ b/llvm/docs/CommandGuide/lit.rst
@@ -384,8 +384,10 @@ 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 (i.e.
+unresolved, timed out, failed or unexpectedly passed tests, see also
+:option:`--report-failures-only`) 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).
``````````
</details>
https://github.com/llvm/llvm-project/pull/136190
More information about the llvm-commits
mailing list