You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ag...@apache.org on 2013/04/04 21:42:31 UTC

[1/2] git commit: o Fix some poms - Use surefire-version that is under test in working-directory and aggregate-report - Remove double commons-io declaration in s-i-tests\pom.xml

Updated Branches:
  refs/heads/SUREFIRE-968 [created] 8a6e559b9


o Fix some poms
- Use surefire-version that is under test in working-directory and aggregate-report
- Remove double commons-io declaration in s-i-tests\pom.xml


Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/f3ab93e2
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/f3ab93e2
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/f3ab93e2

Branch: refs/heads/SUREFIRE-968
Commit: f3ab93e27e278ba97624d841e83c858ef376e453
Parents: 6b49afb
Author: Andreas Gudian <ag...@apache.org>
Authored: Thu Apr 4 21:10:36 2013 +0200
Committer: Andreas Gudian <ag...@apache.org>
Committed: Thu Apr 4 21:10:36 2013 +0200

----------------------------------------------------------------------
 surefire-integration-tests/pom.xml                 |    5 ---
 .../test/resources/aggregate-report/child1/pom.xml |   10 +++++--
 .../test/resources/aggregate-report/child2/pom.xml |    8 ++++-
 .../src/test/resources/aggregate-report/pom.xml    |   22 ++++++++-------
 .../test/resources/working-directory/child/pom.xml |    8 ++++-
 .../src/test/resources/working-directory/pom.xml   |   16 ++++++-----
 6 files changed, 40 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/f3ab93e2/surefire-integration-tests/pom.xml
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/pom.xml b/surefire-integration-tests/pom.xml
index 4a3799f..40d17d1 100644
--- a/surefire-integration-tests/pom.xml
+++ b/surefire-integration-tests/pom.xml
@@ -71,11 +71,6 @@
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>commons-io</groupId>
-      <artifactId>commons-io</artifactId>
-      <version>2.0.1</version>
-    </dependency>
-    <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-artifact</artifactId>
     </dependency>

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/f3ab93e2/surefire-integration-tests/src/test/resources/aggregate-report/child1/pom.xml
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/resources/aggregate-report/child1/pom.xml b/surefire-integration-tests/src/test/resources/aggregate-report/child1/pom.xml
index db5f4f5..b28ab64 100644
--- a/surefire-integration-tests/src/test/resources/aggregate-report/child1/pom.xml
+++ b/surefire-integration-tests/src/test/resources/aggregate-report/child1/pom.xml
@@ -22,10 +22,14 @@
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
-
-  <groupId>org.apache.maven.plugins.surefire</groupId>
+  
+  <parent>
+    <groupId>org.apache.maven.plugins.surefire</groupId>
+    <artifactId>aggregate-report</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  
   <artifactId>aggregate-child1</artifactId>
-  <version>1.0-SNAPSHOT</version>
   <name>child1 for aggregate-reports</name>
 
   <dependencies>

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/f3ab93e2/surefire-integration-tests/src/test/resources/aggregate-report/child2/pom.xml
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/resources/aggregate-report/child2/pom.xml b/surefire-integration-tests/src/test/resources/aggregate-report/child2/pom.xml
index bf09d15..35dee50 100644
--- a/surefire-integration-tests/src/test/resources/aggregate-report/child2/pom.xml
+++ b/surefire-integration-tests/src/test/resources/aggregate-report/child2/pom.xml
@@ -23,9 +23,13 @@
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
 
-  <groupId>org.apache.maven.plugins.surefire</groupId>
+  <parent>
+    <groupId>org.apache.maven.plugins.surefire</groupId>
+    <artifactId>aggregate-report</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
   <artifactId>aggregate-child2</artifactId>
-  <version>1.0-SNAPSHOT</version>
   <name>child2 for aggregate-reports</name>
 
   <dependencies>

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/f3ab93e2/surefire-integration-tests/src/test/resources/aggregate-report/pom.xml
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/resources/aggregate-report/pom.xml b/surefire-integration-tests/src/test/resources/aggregate-report/pom.xml
index 7b65912..c48d7e1 100644
--- a/surefire-integration-tests/src/test/resources/aggregate-report/pom.xml
+++ b/surefire-integration-tests/src/test/resources/aggregate-report/pom.xml
@@ -32,17 +32,19 @@
     <module>child1</module>
     <module>child2</module>
   </modules>
-  
+
   <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <version>${surefire.version}</version>
-        <configuration>
-          <testFailureIgnore>true</testFailureIgnore>
-        </configuration>
-      </plugin>
-    </plugins>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>${surefire.version}</version>
+          <configuration>
+            <testFailureIgnore>true</testFailureIgnore>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
   </build>
   
   <reporting>

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/f3ab93e2/surefire-integration-tests/src/test/resources/working-directory/child/pom.xml
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/resources/working-directory/child/pom.xml b/surefire-integration-tests/src/test/resources/working-directory/child/pom.xml
index 6f22880..bca882c 100644
--- a/surefire-integration-tests/src/test/resources/working-directory/child/pom.xml
+++ b/surefire-integration-tests/src/test/resources/working-directory/child/pom.xml
@@ -23,9 +23,13 @@
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
 
-  <groupId>org.apache.maven.plugins.surefire</groupId>
+  <parent>
+    <groupId>org.apache.maven.plugins.surefire</groupId>
+    <artifactId>working-directory</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
   <artifactId>working-directory-child</artifactId>
-  <version>1.0-SNAPSHOT</version>
   <name>Test for working directory configuration</name>
 
   <dependencies>

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/f3ab93e2/surefire-integration-tests/src/test/resources/working-directory/pom.xml
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/resources/working-directory/pom.xml b/surefire-integration-tests/src/test/resources/working-directory/pom.xml
index 318097e..80e97b3 100644
--- a/surefire-integration-tests/src/test/resources/working-directory/pom.xml
+++ b/surefire-integration-tests/src/test/resources/working-directory/pom.xml
@@ -33,12 +33,14 @@
   </modules>
 
   <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <version>${surefire.version}</version>
-      </plugin>
-    </plugins>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>${surefire.version}</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
   </build>
 </project>
\ No newline at end of file


[2/2] git commit: [SUREFIRE-968] Add test name to Test-Finished console message

Posted by ag...@apache.org.
[SUREFIRE-968] Add test name to Test-Finished console message


Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/8a6e559b
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/8a6e559b
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/8a6e559b

Branch: refs/heads/SUREFIRE-968
Commit: 8a6e559b9b64ef33dcb38ead8a3b3bf69889f377
Parents: f3ab93e
Author: Andreas Gudian <ag...@apache.org>
Authored: Thu Apr 4 21:12:21 2013 +0200
Committer: Andreas Gudian <ag...@apache.org>
Committed: Thu Apr 4 21:12:21 2013 +0200

----------------------------------------------------------------------
 .../plugin/surefire/report/ConsoleReporter.java    |   13 +---------
 .../maven/plugin/surefire/report/TestSetStats.java |    3 ++
 .../plugin/surefire/report/WrappedReportEntry.java |    5 +++
 .../surefire/report/CategorizedReportEntry.java    |   20 +++++++++++++++
 .../apache/maven/surefire/report/ReportEntry.java  |    7 +++++
 .../maven/surefire/report/SimpleReportEntry.java   |    5 +++-
 6 files changed, 40 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/8a6e559b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/ConsoleReporter.java
----------------------------------------------------------------------
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/ConsoleReporter.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/ConsoleReporter.java
index 1fa55c9..14e8c67 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/ConsoleReporter.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/ConsoleReporter.java
@@ -41,10 +41,6 @@ public class ConsoleReporter
 
     private static final String TEST_SET_STARTING_PREFIX = "Running ";
 
-    private static final String TEST_SET_STARTING_GROUP_PREFIX = " (of ";
-
-    private static final String TEST_SET_STARTING_GROUP_SUFIX = ")";
-
     private static final int BUFFER_SIZE = 4096;
 
     private final PrintWriter writer;
@@ -116,14 +112,7 @@ public class ConsoleReporter
     {
         StringBuilder message = new StringBuilder();
         message.append( TEST_SET_STARTING_PREFIX );
-        message.append( report.getName() );
-
-        if ( report.getGroup() != null && !report.getName().equals( report.getGroup() ) )
-        {
-            message.append( TEST_SET_STARTING_GROUP_PREFIX );
-            message.append( report.getGroup() );
-            message.append( TEST_SET_STARTING_GROUP_SUFIX );
-        }
+        message.append( report.getNameWithGroup() );
 
         message.append( "\n" );
         return message.toString();

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/8a6e559b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/TestSetStats.java
----------------------------------------------------------------------
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/TestSetStats.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/TestSetStats.java
index fd5fb27..ef253bf 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/TestSetStats.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/TestSetStats.java
@@ -188,6 +188,9 @@ public class TestSetStats
         {
             buf.append( " <<< FAILURE!" );
         }
+        
+        buf.append( " - in " );
+        buf.append( reportEntry.getNameWithGroup() );
 
         buf.append( "\n" );
 

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/8a6e559b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/WrappedReportEntry.java
----------------------------------------------------------------------
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/WrappedReportEntry.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/WrappedReportEntry.java
index fa941f7..028898f 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/WrappedReportEntry.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/WrappedReportEntry.java
@@ -171,4 +171,9 @@ public class WrappedReportEntry
     {
         return ReportEntryType.success == getReportEntryType();
     }
+
+    public String getNameWithGroup()
+    {
+        return original.getNameWithGroup();
+    }
 }

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/8a6e559b/surefire-api/src/main/java/org/apache/maven/surefire/report/CategorizedReportEntry.java
----------------------------------------------------------------------
diff --git a/surefire-api/src/main/java/org/apache/maven/surefire/report/CategorizedReportEntry.java b/surefire-api/src/main/java/org/apache/maven/surefire/report/CategorizedReportEntry.java
index a91174e..77cfaf3 100644
--- a/surefire-api/src/main/java/org/apache/maven/surefire/report/CategorizedReportEntry.java
+++ b/surefire-api/src/main/java/org/apache/maven/surefire/report/CategorizedReportEntry.java
@@ -26,6 +26,10 @@ public class CategorizedReportEntry
     extends SimpleReportEntry
     implements ReportEntry
 {
+    private static final String GROUP_PREFIX = " (of ";
+
+    private static final String GROUP_SUFIX = ")";
+
     private final String group;
 
     public CategorizedReportEntry( String source, String name, String group )
@@ -60,6 +64,22 @@ public class CategorizedReportEntry
         return group;
     }
 
+    @Override
+    public String getNameWithGroup()
+    {
+        StringBuilder result = new StringBuilder();
+        result.append( getName() );
+
+        if ( getGroup() != null && !getName().equals( getGroup() ) )
+        {
+            result.append( GROUP_PREFIX );
+            result.append( getGroup() );
+            result.append( GROUP_SUFIX );
+        }
+
+        return result.toString();
+    }
+
     public boolean equals( Object o )
     {
         if ( this == o )

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/8a6e559b/surefire-api/src/main/java/org/apache/maven/surefire/report/ReportEntry.java
----------------------------------------------------------------------
diff --git a/surefire-api/src/main/java/org/apache/maven/surefire/report/ReportEntry.java b/surefire-api/src/main/java/org/apache/maven/surefire/report/ReportEntry.java
index 8e87066..65bcb56 100644
--- a/surefire-api/src/main/java/org/apache/maven/surefire/report/ReportEntry.java
+++ b/surefire-api/src/main/java/org/apache/maven/surefire/report/ReportEntry.java
@@ -64,4 +64,11 @@ public interface ReportEntry
      * @return A string that explains an anomaly
      */
     public String getMessage();
+
+    /**
+     * A name of the test case together with the group or category (if any exists).
+     *
+     * @return A string with the test case name and group/category, or just the name.
+     */
+    public String getNameWithGroup();
 }

http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/8a6e559b/surefire-api/src/main/java/org/apache/maven/surefire/report/SimpleReportEntry.java
----------------------------------------------------------------------
diff --git a/surefire-api/src/main/java/org/apache/maven/surefire/report/SimpleReportEntry.java b/surefire-api/src/main/java/org/apache/maven/surefire/report/SimpleReportEntry.java
index ed081fd..ca33a5f 100644
--- a/surefire-api/src/main/java/org/apache/maven/surefire/report/SimpleReportEntry.java
+++ b/surefire-api/src/main/java/org/apache/maven/surefire/report/SimpleReportEntry.java
@@ -187,5 +187,8 @@ public class SimpleReportEntry
         return result;
     }
 
-
+    public String getNameWithGroup()
+    {
+        return getName();
+    }
 }