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 19:17:28 UTC

[maven-scm] branch SCM-911 created (now 184e6fe)

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 184e6fe  [SCM-911] Skip tests if Git executable is not in PATH

This branch includes the following new commits:

     new 184e6fe  [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 184e6fe758cf9e7d7f0e7985c45dca24df6181a8
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Sep 9 21:17:21 2018 +0200

    [SCM-911] Skip tests if Git executable is not in PATH
---
 .../command/checkin/GitCheckInCommandTest.java     | 24 +++++++++++-----------
 1 file changed, 12 insertions(+), 12 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/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 e2e2330..ddb25fd 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
@@ -93,6 +93,12 @@ public class GitCheckInCommandTest
         File repo = getRepositoryRoot();
         File checkedOutRepo = getWorkingCopy();
 
+        if ( !ScmTestCase.isSystemCmd( "git" ) )
+        {
+            System.out.println( "Skip test which requires Git native executable to be in PATH" );
+            return;
+        }
+
         GitScmTestUtils.initRepo("src/test/resources/repository/", getRepositoryRoot(), getWorkingDirectory());
 
         ScmRepository scmRepository = getScmManager().makeScmRepository(
@@ -110,12 +116,6 @@ 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 );
@@ -143,6 +143,12 @@ public class GitCheckInCommandTest
         File repo = getRepositoryRoot();
         File checkedOutRepo = getWorkingCopy();
 
+        if ( !ScmTestCase.isSystemCmd( "git" ) )
+        {
+            System.out.println( "Skip test which requires Git native executable to be in PATH" );
+            return;
+        }
+
         GitScmTestUtils.initRepo( "src/test/resources/repository/", getRepositoryRoot(), getWorkingDirectory() );
 
         ScmRepository scmRepository = getScmManager().makeScmRepository(
@@ -158,12 +164,6 @@ 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" ) );
         assertResultIsSuccess( addResult );