bz-64836 junitlauncher - Print the summary only if any test was present in the test plan
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LauncherSupport.java b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LauncherSupport.java
index 66308dc..f209ac1 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LauncherSupport.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LauncherSupport.java
@@ -612,6 +612,10 @@
@Override
public void testPlanExecutionFinished(final TestPlan testPlan) {
super.testPlanExecutionFinished(testPlan);
+ if (!testPlan.containsTests()) {
+ // we print the summary only if any tests are present
+ return;
+ }
if (launchDefinition.isPrintSummary()) {
final TestExecutionSummary summary = this.getSummary();
// Keep the summary as close to as the old junit task summary