[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:05 PDT 2025
https://github.com/i-ky created https://github.com/llvm/llvm-project/pull/136190
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
>From 2a6e543434064e6726b963186b5d8736987d3006 Mon Sep 17 00:00:00 2001
From: i-ky <gl.ivanovsky at gmail.com>
Date: Thu, 17 Apr 2025 20:06:25 +0000
Subject: [PATCH] Clarify conditions of `lit` exiting with exit code 1
---
llvm/docs/CommandGuide/lit.rst | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
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).
More information about the llvm-commits
mailing list