This is an automated email from the ASF dual-hosted git repository.

jaikiran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git


The following commit(s) were added to refs/heads/master by this push:
     new 840cd27  bz-64836 junitlauncher - Print the summary only if any test 
was present in the test plan
840cd27 is described below

commit 840cd27bae26ca8276723696664c163d5c665920
Author: Jaikiran Pai <jaiki...@apache.org>
AuthorDate: Sun Jan 24 09:17:33 2021 +0530

    bz-64836 junitlauncher - Print the summary only if any test was present in 
the test plan
---
 .../tools/ant/taskdefs/optional/junitlauncher/LauncherSupport.java    | 4 ++++
 1 file changed, 4 insertions(+)

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 @@ public class LauncherSupport {
         @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

Reply via email to