You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2020/05/17 02:15:33 UTC

[maven-shared-utils] branch files-copy-failure-on-jenkins updated: use /bin/sh to copy seems to be an issue with our Jenkins nodes

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

olamy pushed a commit to branch files-copy-failure-on-jenkins
in repository https://gitbox.apache.org/repos/asf/maven-shared-utils.git


The following commit(s) were added to refs/heads/files-copy-failure-on-jenkins by this push:
     new 7fb542e  use /bin/sh to copy seems to be an issue with our Jenkins nodes
7fb542e is described below

commit 7fb542e101a3988b19e6cdb1846de729efa6dd58
Author: olivier lamy <ol...@apache.org>
AuthorDate: Sun May 17 12:15:16 2020 +1000

    use /bin/sh to copy seems to be an issue with our Jenkins nodes
    
    Signed-off-by: olivier lamy <ol...@apache.org>
---
 src/test/java/org/apache/maven/shared/utils/io/FileUtilsTest.java | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/test/java/org/apache/maven/shared/utils/io/FileUtilsTest.java b/src/test/java/org/apache/maven/shared/utils/io/FileUtilsTest.java
index 5b2ce5a..1ab2a27 100644
--- a/src/test/java/org/apache/maven/shared/utils/io/FileUtilsTest.java
+++ b/src/test/java/org/apache/maven/shared/utils/io/FileUtilsTest.java
@@ -497,10 +497,12 @@ public class FileUtilsTest
     public void copyFileWithPermissions()
         throws Exception
     {
-        File source = new File( "/bin/sh" );
-        assumeThat( "Need an executable to copy", source.exists(), is( true ) );
+        File source = new File( "src/test/resources/executable" );
+        source.setExecutable( true );
+        assumeThat( "Need an existing file to copy", source.exists(), is( true ) );
+        assumeThat( "Need an executable file to copy", source.canExecute(), is( true ) );
 
-        File destination = new File( tempFolder.getRoot(), "executable" );
+        File destination = new File( tempFolder.getRoot(), "executable-copy" );
 
         FileUtils.copyFile( source, destination );