git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[JGIT PATCH] Skip executeBit-tests for filesystems which do not support this feature

From
Tor Arne Vestbø <torarnv@gmail.com>
Date
Feb 3, 2009, 17:44 UTC
Message-ID
<1233683048-22767-1-git-send-email-torarnv@gmail.com>
Signed-off-by: Tor Arne Vestbø <torarnv@gmail.com>
---
 .../tst/org/spearce/jgit/lib/T0007_Index.java      |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/org.spearce.jgit.test/tst/org/spearce/jgit/lib/T0007_Index.java b/org.spearce.jgit.test/tst/org/spearce/jgit/lib/T0007_Index.java
index 499812e..fbda4fb 100644
--- a/org.spearce.jgit.test/tst/org/spearce/jgit/lib/T0007_Index.java
+++ b/org.spearce.jgit.test/tst/org/spearce/jgit/lib/T0007_Index.java
@@ -46,6 +46,7 @@
 import java.lang.reflect.Method;
 
 import org.spearce.jgit.lib.GitIndex.Entry;
+import org.spearce.jgit.util.FS;
 
 public class T0007_Index extends RepositoryTestCase {
 
@@ -319,6 +320,10 @@ public void testCheckout() throws Exception {
 	}
 
 	public void test030_executeBit_coreModeTrue() throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, Error, Exception {
+		if (!FS.INSTANCE.supportsExecute()) {
+			System.err.println("Test ignored since platform FS does not support the execute permission");
+			return;
+		}
 		try {
 			// coremode true is the default, typically set to false
 			// by git init (but not jgit!)
@@ -370,6 +375,10 @@ public void test030_executeBit_coreModeTrue() throws IllegalArgumentException, I
 	}
 
 	public void test031_executeBit_coreModeFalse() throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, Error, Exception {
+		if (!FS.INSTANCE.supportsExecute()) {
+			System.err.println("Test ignored since platform FS does not support the execute permission");
+			return;
+		}
 		try {
 			// coremode true is the default, typically set to false
 			// by git init (but not jgit!)
-- 
1.6.1.2.309.g2ea3
Message 1 of 1 in “Skip executeBit-tests for filesystems which do not support this feature”
  1. Skip executeBit-tests for filesystems which do not support this featureTor Arne Vestbø, Feb 3, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.