[llvm] [llvm][lit] Add option to run only the failed tests (PR #158043)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 18 01:53:06 PDT 2025
================
@@ -0,0 +1,14 @@
+# Shows behaviour when a previously failed test was deleted
+# before running with --filter-failed.
+
+# RUN: rm -rf %t
+# RUN: cp -r %{inputs}/filter-failed %t
+#
+# RUN: not %{lit} %t | FileCheck %s --check-prefix=CHECK-FIRST
+#
+# RUN: rm %t/fail.txt
+# RUN: not %{lit} --filter-failed %t | FileCheck %s --check-prefix=CHECK-RERUN
+
+# CHECK-FIRST: FAIL: filter-failed :: fail.txt
+
+# CHECK-RERUN-NOT: filter-failed :: fail.txt
----------------
jh7370 wrote:
It's probably worth adding something here to show the testsuite run has completed gracefully. I could imagine that lit throws an exception in this case, because it tried to run a test that didn't exist, for example. Perhaps it's enough to also show the number of tests that were run.
https://github.com/llvm/llvm-project/pull/158043
More information about the llvm-commits
mailing list