[Lldb-commits] [lldb] [lldb] change how unsupported tests are aggregated (PR #185675)
Charles Zablit via lldb-commits
lldb-commits at lists.llvm.org
Tue Mar 10 10:54:21 PDT 2026
https://github.com/charles-zablit updated https://github.com/llvm/llvm-project/pull/185675
>From 7309b29a80c7aafbb34321a8ae6d151384ecfe82 Mon Sep 17 00:00:00 2001
From: Charles Zablit <c_zablit at apple.com>
Date: Tue, 10 Mar 2026 15:28:43 +0000
Subject: [PATCH 1/2] [lldb] change how unsupported tests are aggregated
---
lldb/test/API/lldbtest.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/lldb/test/API/lldbtest.py b/lldb/test/API/lldbtest.py
index d6b79ebc2c434..e5e4618bf2a3f 100644
--- a/lldb/test/API/lldbtest.py
+++ b/lldb/test/API/lldbtest.py
@@ -138,12 +138,11 @@ def execute(self, test, litConfig):
(unexpected_successes, lit.Test.XPASS),
]
else:
- # Mark this test as PASS if at least one test passed.
- if passes > 0:
- return lit.Test.PASS, output
+ # Only mark the test as unsupported if they are all unsupported.
+ if passes == 0 and expected_failures == 0:
+ return lit.Test.UNSUPPORTED
lit_results = [
(passes, lit.Test.PASS),
- (skipped, lit.Test.UNSUPPORTED),
(expected_failures, lit.Test.XFAIL),
]
>From 8f4be2d98982508ed104580262e6954670580514 Mon Sep 17 00:00:00 2001
From: Charles Zablit <c_zablit at apple.com>
Date: Tue, 10 Mar 2026 17:51:05 +0000
Subject: [PATCH 2/2] fixup! [lldb] change how unsupported tests are aggregated
---
lldb/test/API/lldbtest.py | 29 ++++++++++++-----------------
1 file changed, 12 insertions(+), 17 deletions(-)
diff --git a/lldb/test/API/lldbtest.py b/lldb/test/API/lldbtest.py
index e5e4618bf2a3f..acd018236e440 100644
--- a/lldb/test/API/lldbtest.py
+++ b/lldb/test/API/lldbtest.py
@@ -129,23 +129,18 @@ def execute(self, test, litConfig):
passes = num_ran - non_pass
if exitCode:
- # Mark this test as FAIL if at least one test failed.
+ # Aggregate the tests results with the following precedence:
+ # UNRESOLVED > FAIL > XPASS
+ if errors > 0:
+ return lit.Test.UNRESOLVED, output
if failures > 0:
return lit.Test.FAIL, output
- lit_results = [
- (failures, lit.Test.FAIL),
- (errors, lit.Test.UNRESOLVED),
- (unexpected_successes, lit.Test.XPASS),
- ]
+ return lit.Test.XPASS, output
else:
- # Only mark the test as unsupported if they are all unsupported.
- if passes == 0 and expected_failures == 0:
- return lit.Test.UNSUPPORTED
- lit_results = [
- (passes, lit.Test.PASS),
- (expected_failures, lit.Test.XFAIL),
- ]
-
- # Return the lit result code with the maximum occurrence. Only look at
- # the first element and rely on the original order to break ties.
- return max(lit_results, key=operator.itemgetter(0))[1], output
+ # Aggregate the tests results with the following precedence:
+ # PASS > XFAIL > UNSUPPORTED
+ if passes > 0:
+ return lit.Test.PASS, output
+ if expected_failures > 0:
+ return lit.Test.XFAIL, output
+ return lit.Test.UNSUPPORTED, output
More information about the lldb-commits
mailing list