You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2018/09/09 11:25:33 UTC

[maven-scm] branch SCM-911 created (now 64ab819)

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

michaelo pushed a change to branch SCM-911
in repository https://gitbox.apache.org/repos/asf/maven-scm.git.


      at 64ab819  [SCM-911] Skip tests if Git executable is not in PATH

This branch includes the following new commits:

     new 64ab819  [SCM-911] Skip tests if Git executable is not in PATH

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[maven-scm] 01/01: [SCM-911] Skip tests if Git executable is not in PATH

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch SCM-911
in repository https://gitbox.apache.org/repos/asf/maven-scm.git

commit 64ab8196375e914b894434f9a737bf3cea9d0021
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Sep 9 13:25:05 2018 +0200

    [SCM-911] Skip tests if Git executable is not in PATH
---
 .../command/checkin/GitCheckInCommandNoBranchTest.java      |  2 +-
 .../git/gitexe/command/checkin/GitCheckInCommandTest.java   | 13 ++++++++++++-
 .../command/checkout/GitExeCheckOutCommandNoBranchTest.java |  4 ++--
 3 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/test/java/org/apache/maven/scm/provider/git/gitexe/command/checkin/GitCheckInCommandNoBranchTest.java b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/test/java/org/apache/maven/scm/provider/git/gitexe/command/checkin/GitCheckInCommandNoBranchTest.java
index 65ce12a..ff985f7 100644
--- a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/test/java/org/apache/maven/scm/provider/git/gitexe/command/checkin/GitCheckInCommandNoBranchTest.java
+++ b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/test/java/org/apache/maven/scm/provider/git/gitexe/command/checkin/GitCheckInCommandNoBranchTest.java
@@ -53,7 +53,7 @@ public class GitCheckInCommandNoBranchTest
     {
         if ( !ScmTestCase.isSystemCmd( "git" ) )
         {
-            System.out.println( "skip test which git native executable in path" );
+            System.out.println( "Skip test which requires Git native executable to be in PATH" );
             return;
         }
         File repo_orig = new File( "src/test/resources/repository_no_branch" );
diff --git a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/test/java/org/apache/maven/scm/provider/git/gitexe/command/checkin/GitCheckInCommandTest.java b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/test/java/org/apache/maven/scm/provider/git/gitexe/command/checkin/GitCheckInCommandTest.java
index cea5b91..e2e2330 100644
--- a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/test/java/org/apache/maven/scm/provider/git/gitexe/command/checkin/GitCheckInCommandTest.java
+++ b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/test/java/org/apache/maven/scm/provider/git/gitexe/command/checkin/GitCheckInCommandTest.java
@@ -110,6 +110,12 @@ public class GitCheckInCommandTest
         File wineFile = new File(barDir.getAbsolutePath(), "wine.xml");
         FileUtils.fileWrite( wineFile.getAbsolutePath(), "Lacoste castle" );
 
+        if ( !ScmTestCase.isSystemCmd( "git" ) )
+        {
+            System.out.println( "Skip test which requires Git native executable to be in PATH" );
+            return;
+        }
+
         // Adding and commiting file
         AddScmResult addResult = getScmManager().add( scmRepository, new ScmFileSet( checkedOutRepo, new File( "foo/bar/wine.xml" ) ) );
         assertResultIsSuccess( addResult );
@@ -129,7 +135,7 @@ public class GitCheckInCommandTest
         assertResultIsSuccess(addResult);
         checkInScmResult = getScmManager().checkIn(scmRepository, new ScmFileSet(checkedOutRepo), "moved wine.xml from foo/bar/ to foo/newbar/");
         assertResultIsSuccess(checkInScmResult);
-        assertTrue("Renamed file has not been commited !", checkInScmResult.getCheckedInFiles().size() != 0);
+        assertTrue("Renamed file has not been commited!", checkInScmResult.getCheckedInFiles().size() != 0);
     }
 
     // Test FileSet in configuration
@@ -152,6 +158,11 @@ public class GitCheckInCommandTest
         File whiskeyFile = new File( checkedOutRepo.getAbsolutePath(), "whiskey.xml" );
         FileUtils.fileWrite( whiskeyFile.getAbsolutePath(), "700 ml" );
 
+        if ( !ScmTestCase.isSystemCmd( "git" ) )
+        {
+            System.out.println( "Skip test which requires Git native executable to be in PATH" );
+            return;
+        }
 
         // Adding and commiting beer and whiskey
         AddScmResult addResult = getScmManager().add( scmRepository, new ScmFileSet( checkedOutRepo, "beer.xml,whiskey.xml" ) );
diff --git a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/test/java/org/apache/maven/scm/provider/git/gitexe/command/checkout/GitExeCheckOutCommandNoBranchTest.java b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/test/java/org/apache/maven/scm/provider/git/gitexe/command/checkout/GitExeCheckOutCommandNoBranchTest.java
index b0ae87a..b141783 100644
--- a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/test/java/org/apache/maven/scm/provider/git/gitexe/command/checkout/GitExeCheckOutCommandNoBranchTest.java
+++ b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe/src/test/java/org/apache/maven/scm/provider/git/gitexe/command/checkout/GitExeCheckOutCommandNoBranchTest.java
@@ -59,7 +59,7 @@ public class GitExeCheckOutCommandNoBranchTest
     {
         if ( !ScmTestCase.isSystemCmd( "git" ) )
         {
-            System.out.println( "skip test which git native executable in path" );
+            System.out.println( "Skip test which requires Git native executable to be in PATH" );
             return;
         }
         CheckOutScmResult result = checkoutRepo();
@@ -71,7 +71,7 @@ public class GitExeCheckOutCommandNoBranchTest
     {
         if ( !ScmTestCase.isSystemCmd( "git" ) )
         {
-            System.out.println( "skip test which git native executable in path" );
+            System.out.println( "Skip test which requires Git native executable to be in PATH" );
             return;
         }
         CheckOutScmResult result = checkoutRepo();