[Git][java-team/plexus-io][master] 3 commits: Ignore symlink tests to avoid a FTBFS

Markus Koschany (@apo) gitlab at salsa.debian.org
Wed Jun 29 18:17:45 BST 2022



Markus Koschany pushed to branch master at Debian Java Maintainers / plexus-io


Commits:
6e053725 by Markus Koschany at 2022-06-29T19:07:18+02:00
Ignore symlink tests to avoid a FTBFS

- - - - -
32582886 by Markus Koschany at 2022-06-29T19:13:48+02:00
Remove test symlinks and update patch header

- - - - -
e3040ae6 by Markus Koschany at 2022-06-29T19:16:04+02:00
Update changelog

- - - - -


4 changed files:

- debian/changelog
- + debian/patches/ignore-symlink-tests.patch
- debian/patches/series
- debian/rules


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+plexus-io (3.3.1-2) unstable; urgency=medium
+
+  * Team upload.
+  * Ignore symlink tests to avoid a FTBFS and work around a bug in
+    maven-resources-plugin. (Closes: #1013595)
+
+ -- Markus Koschany <apo at debian.org>  Wed, 29 Jun 2022 19:14:50 +0200
+
 plexus-io (3.3.1-1) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/patches/ignore-symlink-tests.patch
=====================================
@@ -0,0 +1,123 @@
+From: Markus Koschany <apo at debian.org>
+Date: Wed, 29 Jun 2022 19:06:50 +0200
+Subject: ignore symlink tests
+
+Workaround for https://issues.apache.org/jira/browse/MRESOURCES-237
+
+Bug-Debian: https://bugs.debian.org/1013595
+Forwarded: not-needed
+---
+ .../PlexusIoResourceAttributeUtilsTest.java        | 36 ----------------------
+ ...PlexusIoFileSupplierResourceCollectionTest.java | 20 ------------
+ .../PlexusIoPlexusIoFileResourceTest.java          | 18 -----------
+ 3 files changed, 74 deletions(-)
+
+diff --git a/src/test/java/org/codehaus/plexus/components/io/attributes/PlexusIoResourceAttributeUtilsTest.java b/src/test/java/org/codehaus/plexus/components/io/attributes/PlexusIoResourceAttributeUtilsTest.java
+index 573fb2d..3c1af75 100644
+--- a/src/test/java/org/codehaus/plexus/components/io/attributes/PlexusIoResourceAttributeUtilsTest.java
++++ b/src/test/java/org/codehaus/plexus/components/io/attributes/PlexusIoResourceAttributeUtilsTest.java
+@@ -112,28 +112,6 @@ public void testDirectory()
+         assertNotNull( fileAttrs );
+     }
+ 
+-    public void testSrcResource()
+-        throws IOException
+-    {
+-        if ( Os.isFamily( Os.FAMILY_WINDOWS ) )
+-        {
+-            return; // Nothing to do here.
+-        }
+-
+-        File dir = new File( "src/test/resources/symlinks" );
+-        final Map<String, PlexusIoResourceAttributes> fileAttributesByPathScreenScrape =
+-            PlexusIoResourceAttributeUtils.getFileAttributesByPath( dir, true );
+-        assertNotNull( fileAttributesByPathScreenScrape );
+-        PlexusIoResourceAttributes pr = null;
+-        for ( String s : fileAttributesByPathScreenScrape.keySet() )
+-        {
+-            if ( s.endsWith( "targetFile.txt" ) )
+-                pr = fileAttributesByPathScreenScrape.get( s );
+-        }
+-        assertNotNull( pr );
+-
+-        assertTrue( pr.getOctalMode() > 0 );
+-    }
+     public void testNonExistingDirectory()
+     {
+         File dir = new File( "src/test/noSuchDirectory" );
+@@ -285,20 +263,6 @@ public void testMergeAttributesOverride()
+         assertEquals( 0111, attributes.getOctalMode() );
+     }
+ 
+-    public void testFileAttributes()
+-        throws IOException
+-    {
+-        PlexusIoResourceAttributes attrs = getFileAttributes( new File( "src/test/resources/symlinks/src/fileW.txt" ) );
+-        assertFalse( attrs.isSymbolicLink() );
+-        assertTrue( StringUtils.isNotEmpty( attrs.getUserName() ) );
+-        if ( !Os.isFamily( Os.FAMILY_WINDOWS ) )
+-        {
+-            assertTrue( StringUtils.isNotEmpty( attrs.getGroupName() ) );
+-            assertNotNull( attrs.getGroupId() );
+-            assertNotNull( attrs.getUserId() );
+-        }
+-    }
+-
+     public void testMergeAttributesDefault()
+     {
+         final PlexusIoResourceAttributes blank = new SimpleResourceAttributes( null, null, null, null, 0 );
+diff --git a/src/test/java/org/codehaus/plexus/components/io/resources/PlexusIoFileSupplierResourceCollectionTest.java b/src/test/java/org/codehaus/plexus/components/io/resources/PlexusIoFileSupplierResourceCollectionTest.java
+index d45762d..10aef46 100755
+--- a/src/test/java/org/codehaus/plexus/components/io/resources/PlexusIoFileSupplierResourceCollectionTest.java
++++ b/src/test/java/org/codehaus/plexus/components/io/resources/PlexusIoFileSupplierResourceCollectionTest.java
+@@ -8,23 +8,3 @@
+ /**
+  * @author Kristian Rosenvold
+  */
+-public class PlexusIoFileSupplierResourceCollectionTest
+-    extends TestCase
+-{
+-    public void testGetName()
+-        throws Exception
+-    {
+-        PlexusIoFileResourceCollection coll = new PlexusIoFileResourceCollection();
+-        char nonSeparator = File.separatorChar == '/' ? '\\' : '/';
+-        coll.setPrefix( "fud" + nonSeparator );
+-
+-        coll.setBaseDir( new File( "src/test/resources/symlinks" ) );
+-        final Iterator<PlexusIoResource> resources = coll.getResources();
+-        while ( resources.hasNext() )
+-        {
+-            final PlexusIoResource next = resources.next();
+-            final String name = coll.getName( next );
+-            assertTrue( name.indexOf( nonSeparator ) < 0 );
+-        }
+-    }
+-}
+diff --git a/src/test/java/org/codehaus/plexus/components/io/resources/PlexusIoPlexusIoFileResourceTest.java b/src/test/java/org/codehaus/plexus/components/io/resources/PlexusIoPlexusIoFileResourceTest.java
+index f636277..17a4c70 100644
+--- a/src/test/java/org/codehaus/plexus/components/io/resources/PlexusIoPlexusIoFileResourceTest.java
++++ b/src/test/java/org/codehaus/plexus/components/io/resources/PlexusIoPlexusIoFileResourceTest.java
+@@ -10,21 +10,3 @@
+ import org.codehaus.plexus.components.io.attributes.SymlinkUtils;
+ import org.codehaus.plexus.util.Os;
+ 
+-public class PlexusIoPlexusIoFileResourceTest
+-    extends TestCase {
+-
+-    public void testRealSymlink()
+-        throws IOException
+-    {
+-        if ( Os.isFamily( Os.FAMILY_WINDOWS ) )
+-            return;
+-        final File file = new File( "src/test/resources/symlinks/src/symDir" );
+-        PlexusIoResourceAttributes attrs = FileAttributes.uncached( file );
+-        assertTrue( attrs.isSymbolicLink() );
+-        PlexusIoFileResource r = new PlexusIoFileResource( file, "symDir", attrs );
+-        assertTrue( r.isSymbolicLink() );
+-        assertTrue( r.isDirectory() );
+-        final File target = SymlinkUtils.readSymbolicLink( file );
+-        assertTrue( target.getName().endsWith( "targetDir" ) );
+-    }
+-}
+\ No newline at end of file


=====================================
debian/patches/series
=====================================
@@ -1 +1,2 @@
 01-backward-compatibility.patch
+ignore-symlink-tests.patch


=====================================
debian/rules
=====================================
@@ -2,3 +2,8 @@
 
 %:
 	dh $@
+
+override_dh_auto_build:
+	# Workaround for maven-resources-plugin bug https://issues.apache.org/jira/browse/MRESOURCES-237
+	$(RM) src/test/resources/symlinks/src/sym*
+	dh_auto_build



View it on GitLab: https://salsa.debian.org/java-team/plexus-io/-/compare/9a4e7b9f0af4b95eb31068e2031d3a9adffa0a8c...e3040ae6fa171385849a59ee69ef60db5d65e391

-- 
View it on GitLab: https://salsa.debian.org/java-team/plexus-io/-/compare/9a4e7b9f0af4b95eb31068e2031d3a9adffa0a8c...e3040ae6fa171385849a59ee69ef60db5d65e391
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20220629/b7ab669f/attachment.htm>


More information about the pkg-java-commits mailing list