diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutTest.java index 6d62528f8..51a6b5a8f 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/DirCacheCheckoutTest.java @@ -79,6 +79,7 @@ import org.eclipse.jgit.treewalk.FileTreeIterator; import org.eclipse.jgit.treewalk.TreeWalk; import org.eclipse.jgit.util.FS; import org.eclipse.jgit.util.FileUtils; +import org.junit.Assume; import org.junit.Test; public class DirCacheCheckoutTest extends RepositoryTestCase { @@ -925,6 +926,7 @@ public class DirCacheCheckoutTest extends RepositoryTestCase { @Test public void testCheckoutChangeLinkToEmptyDir() throws Exception { + Assume.assumeTrue(FS.DETECTED.supportsSymlinks()); String fname = "was_file"; Git git = Git.wrap(db); @@ -961,6 +963,7 @@ public class DirCacheCheckoutTest extends RepositoryTestCase { @Test public void testCheckoutChangeLinkToEmptyDirs() throws Exception { + Assume.assumeTrue(FS.DETECTED.supportsSymlinks()); String fname = "was_file"; Git git = Git.wrap(db); @@ -999,6 +1002,7 @@ public class DirCacheCheckoutTest extends RepositoryTestCase { @Test public void testCheckoutChangeLinkToNonEmptyDirs() throws Exception { + Assume.assumeTrue(FS.DETECTED.supportsSymlinks()); String fname = "file"; Git git = Git.wrap(db); @@ -1043,6 +1047,7 @@ public class DirCacheCheckoutTest extends RepositoryTestCase { @Test public void testCheckoutChangeLinkToNonEmptyDirsAndNewIndexEntry() throws Exception { + Assume.assumeTrue(FS.DETECTED.supportsSymlinks()); String fname = "file"; Git git = Git.wrap(db); @@ -1364,6 +1369,7 @@ public class DirCacheCheckoutTest extends RepositoryTestCase { @Test public void testOverwriteUntrackedLinkModeChange() throws Exception { + Assume.assumeTrue(FS.DETECTED.supportsSymlinks()); String fname = "file.txt"; Git git = Git.wrap(db); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/FileTreeIteratorJava7Test.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/FileTreeIteratorJava7Test.java index 88754109f..429f35ea4 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/FileTreeIteratorJava7Test.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/FileTreeIteratorJava7Test.java @@ -67,6 +67,7 @@ import org.junit.Test; public class FileTreeIteratorJava7Test extends RepositoryTestCase { @Test public void testFileModeSymLinkIsNotATree() throws IOException { + org.junit.Assume.assumeTrue(FS.DETECTED.supportsSymlinks()); FS fs = db.getFS(); // mål = target in swedish, just to get som unicode in here writeTrashFile("mål/data", "targetdata"); @@ -163,6 +164,7 @@ public class FileTreeIteratorJava7Test extends RepositoryTestCase { */ @Test public void testSymlinkActuallyModified() throws Exception { + org.junit.Assume.assumeTrue(FS.DETECTED.supportsSymlinks()); final String NORMALIZED = "target"; final byte[] NORMALIZED_BYTES = Constants.encode(NORMALIZED); try (ObjectInserter oi = db.newObjectInserter()) { diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/TreeWalkJava7Test.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/TreeWalkJava7Test.java index bb1f2a639..1328b38e6 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/TreeWalkJava7Test.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/TreeWalkJava7Test.java @@ -55,6 +55,7 @@ import org.junit.Test; public class TreeWalkJava7Test extends RepositoryTestCase { @Test public void testSymlinkToDirNotRecursingViaSymlink() throws Exception { + org.junit.Assume.assumeTrue(FS.DETECTED.supportsSymlinks()); FS fs = db.getFS(); assertTrue(fs.supportsSymlinks()); writeTrashFile("target/data", "targetdata"); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSJava7Test.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSJava7Test.java index e6a244e14..53b6fecfd 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSJava7Test.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FSJava7Test.java @@ -57,6 +57,7 @@ import java.util.Set; import org.eclipse.jgit.junit.RepositoryTestCase; import org.junit.After; +import org.junit.Assume; import org.junit.Before; import org.junit.Test; @@ -87,6 +88,7 @@ public class FSJava7Test { */ @Test public void testSymlinkAttributes() throws IOException, InterruptedException { + Assume.assumeTrue(FS.DETECTED.supportsSymlinks()); FS fs = FS.DETECTED; File link = new File(trash, "ä"); File target = new File(trash, "å"); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FileUtils7Test.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FileUtils7Test.java index 4625f3068..cc1fdc21b 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FileUtils7Test.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/FileUtils7Test.java @@ -73,6 +73,7 @@ public class FileUtils7Test { @Test public void testDeleteSymlinkToDirectoryDoesNotDeleteTarget() throws IOException { + org.junit.Assume.assumeTrue(FS.DETECTED.supportsSymlinks()); FS fs = FS.DETECTED; File dir = new File(trash, "dir"); File file = new File(dir, "file"); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java index 2450be4c1..28d628b34 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java @@ -162,11 +162,6 @@ public class FS_Win32_Cygwin extends FS_Win32 { errRedirect, stdinArgs); } - @Override - public boolean supportsSymlinks() { - return true; - } - /** * @since 3.7 */