maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject maven-integration-testing git commit: added color to ITs run tracking
Date Sun, 05 Jun 2016 09:45:06 GMT
Repository: maven-integration-testing
Updated Branches:
  refs/heads/master af138c8a7 -> 13bd54165


added color to ITs run tracking

Project: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/commit/13bd5416
Tree: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/tree/13bd5416
Diff: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/diff/13bd5416

Branch: refs/heads/master
Commit: 13bd54165095c077fbc294cda8260cbde210cf3c
Parents: af138c8
Author: Hervé Boutemy <hboutemy@apache.org>
Authored: Sun Jun 5 11:44:56 2016 +0200
Committer: Hervé Boutemy <hboutemy@apache.org>
Committed: Sun Jun 5 11:44:56 2016 +0200

----------------------------------------------------------------------
 core-it-support/maven-it-helper/pom.xml         |  5 ++++
 .../it/AbstractMavenIntegrationTestCase.java    | 25 ++++++++++++--------
 2 files changed, 20 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/13bd5416/core-it-support/maven-it-helper/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-support/maven-it-helper/pom.xml b/core-it-support/maven-it-helper/pom.xml
index 4bafebc..da9c352 100644
--- a/core-it-support/maven-it-helper/pom.xml
+++ b/core-it-support/maven-it-helper/pom.xml
@@ -60,5 +60,10 @@ under the License.
       <artifactId>junit</artifactId>
       <version>3.8.2</version>
     </dependency>
+    <dependency>
+      <groupId>org.fusesource.jansi</groupId>
+      <artifactId>jansi</artifactId>
+      <version>1.12</version>
+    </dependency>
   </dependencies>
 </project>

http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/13bd5416/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java
----------------------------------------------------------------------
diff --git a/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java
b/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java
index 8966dce..3a9690f 100644
--- a/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java
+++ b/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java
@@ -26,6 +26,8 @@ import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException
 import org.apache.maven.artifact.versioning.VersionRange;
 import org.apache.maven.shared.utils.io.FileUtils;
 
+import static org.fusesource.jansi.Ansi.ansi;
+
 import java.io.File;
 import java.io.IOException;
 import java.io.PrintStream;
@@ -97,8 +99,8 @@ public abstract class AbstractMavenIntegrationTestCase
         }
         else
         {
-            out.println( "WARNING: " + getITName() + ": version range '" + versionRange
-                             + "' supplied but no Maven version - not skipping test." );
+            out.println( ansi().bold().fgYellow().a( "WARNING: " ).reset() + getITName()
+ ": version range '"
+                + versionRange + "' supplied but no Maven version - not skipping test." );
         }
     }
 
@@ -204,7 +206,8 @@ public abstract class AbstractMavenIntegrationTestCase
 
         if ( skip )
         {
-            out.println( "SKIPPED - Maven version " + getMavenVersion() + " not in range
" + versionRange );
+            out.println( ansi().bold().fgYellow().a( "SKIPPED" ).reset() + " - Maven version
" + getMavenVersion()
+                + " not in range " + versionRange );
             return;
         }
 
@@ -218,22 +221,24 @@ public abstract class AbstractMavenIntegrationTestCase
         {
             super.runTest();
             milliseconds = System.currentTimeMillis() - milliseconds;
-            out.println( "OK " + formatTime( milliseconds ) );
+            out.println( ansi().bold().fgGreen().a( "OK " ).reset() + formatTime( milliseconds
) );
         }
         catch ( UnsupportedJavaVersionException e )
         {
-            out.println( "SKIPPED - Java version " + e.javaVersion + " not in range " + e.supportedRange
);
+            out.println( ansi().bold().fgYellow().a( "SKIPPED" ).reset() + " - Java version
" + e.javaVersion
+                + " not in range " + e.supportedRange );
             return;
         }
         catch ( UnsupportedMavenVersionException e )
         {
-            out.println( "SKIPPED - Maven version " + e.mavenVersion + " not in range " +
e.supportedRange );
+            out.println( ansi().bold().fgYellow().a( "SKIPPED" ).reset() + " - Maven version
" + e.mavenVersion
+                + " not in range " + e.supportedRange );
             return;
         }
         catch ( Throwable t )
         {
             milliseconds = System.currentTimeMillis() - milliseconds;
-            out.println( "FAILURE " + formatTime( milliseconds ) );
+            out.println( ansi().bold().fgRed().a( "FAILURE " ).reset() + formatTime( milliseconds
) );
             throw t;
         }
     }
@@ -295,8 +300,8 @@ public abstract class AbstractMavenIntegrationTestCase
         }
         else
         {
-            out.println( "WARNING: " + getITName() + ": version range '" + versionRange
-                             + "' supplied but no Maven version found - not skipping test."
);
+            out.println( ansi().bold().fgYellow().a( "WARNING: " ).reset() + getITName()
+ ": version range '"
+                + versionRange + "' supplied but no Maven version found - not skipping test."
);
         }
     }
 
@@ -352,7 +357,7 @@ public abstract class AbstractMavenIntegrationTestCase
         {
             methodName = methodName.substring( 4 );
         }
-        return className + '(' + methodName + ')';
+        return className + '(' + ansi().bold().a( methodName ).reset()  + ')';
     }
 
     private String pad( int chars )


Mime
View raw message