maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1090545 - /maven/scm/trunk/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/RemoveMojoTest.java
Date Sat, 09 Apr 2011 08:29:04 GMT
Author: olamy
Date: Sat Apr  9 08:29:04 2011
New Revision: 1090545

URL: http://svn.apache.org/viewvc?rev=1090545&view=rev
Log:
check p4 is available in cli before running test

Modified:
    maven/scm/trunk/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/RemoveMojoTest.java

Modified: maven/scm/trunk/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/RemoveMojoTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/RemoveMojoTest.java?rev=1090545&r1=1090544&r2=1090545&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/RemoveMojoTest.java
(original)
+++ maven/scm/trunk/maven-scm-plugin/src/test/java/org/apache/maven/scm/plugin/RemoveMojoTest.java
Sat Apr  9 08:29:04 2011
@@ -21,6 +21,8 @@ package org.apache.maven.scm.plugin;
 
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.testing.AbstractMojoTestCase;
+import org.apache.maven.scm.ScmTestCase;
+import org.apache.maven.scm.provider.svn.SvnScmTestUtils;
 import org.codehaus.plexus.util.StringUtils;
 
 import java.io.File;
@@ -31,6 +33,13 @@ import java.io.File;
 public class RemoveMojoTest extends AbstractMojoTestCase {
 
     public void testShouldInvokeP4Delete() throws Exception {
+
+        if ( !ScmTestCase.isSystemCmd("p4") )
+        {
+            System.out.println( "'skip test as p4 is not available" );
+            return;
+        }
+
         String testConfig = "src/test/resources/mojos/remove/removeWithPerforce.xml";
         try {
             RemoveMojo removeMojo = (RemoveMojo) lookupMojo("remove", getTestFile(testConfig));
@@ -54,6 +63,11 @@ public class RemoveMojoTest extends Abst
     }
 
     public void testShouldFailToInvokeP4Delete() throws Exception {
+        if ( !ScmTestCase.isSystemCmd("p4") )
+        {
+            System.out.println( "'skip test as p4 is not available" );
+            return;
+        }
         String testConfig = "src/test/resources/mojos/remove/removeWithPerforceNoIncludes.xml";
         try {
             RemoveMojo removeMojo = (RemoveMojo) lookupMojo("remove", getTestFile(testConfig));



Mime
View raw message