This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/master by this push:
new 3191ba0bb6 minor refactor: add aggregate test result summary to build
(tweak to not display if only one suite)
3191ba0bb6 is described below
commit 3191ba0bb6092a8d17186b2a02f628fa723669e7
Author: Paul King <[email protected]>
AuthorDate: Wed Apr 15 19:34:57 2026 +1000
minor refactor: add aggregate test result summary to build (tweak to not
display if only one suite)
---
.../org/apache/groovy/gradle/TestResultAggregatorService.groovy | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/build-logic/src/main/groovy/org/apache/groovy/gradle/TestResultAggregatorService.groovy
b/build-logic/src/main/groovy/org/apache/groovy/gradle/TestResultAggregatorService.groovy
index e525f231b7..4d51b7ad97 100644
---
a/build-logic/src/main/groovy/org/apache/groovy/gradle/TestResultAggregatorService.groovy
+++
b/build-logic/src/main/groovy/org/apache/groovy/gradle/TestResultAggregatorService.groovy
@@ -42,12 +42,14 @@ abstract class TestResultAggregatorService implements
BuildService<Params>, Oper
interface Params extends BuildServiceParameters {}
+ private final AtomicLong suiteCount = new AtomicLong()
private final AtomicLong totalPassed = new AtomicLong()
private final AtomicLong totalFailed = new AtomicLong()
private final AtomicLong totalSkipped = new AtomicLong()
/** Called from afterSuite when a root suite completes. */
void recordSuite(long passed, long failed, long skipped) {
+ suiteCount.incrementAndGet()
totalPassed.addAndGet(passed)
totalFailed.addAndGet(failed)
totalSkipped.addAndGet(skipped)
@@ -65,7 +67,7 @@ abstract class TestResultAggregatorService implements
BuildService<Params>, Oper
long failed = totalFailed.get()
long skipped = totalSkipped.get()
long total = passed + failed + skipped
- if (total == 0) return
+ if (total == 0 || suiteCount.get() <= 1) return
String green = '\u001B[32m'
String red = '\u001B[31m'