Thread (8 messages) flat view 8 messages, 3 authors, 2016-06-15
STALE3730d

Revision v2 of 5 in this series.

Revisions (5)
  1. v2 current
  2. v3 [diff vs current]
  3. v4 [diff vs current]
  4. v5 [diff vs current]
  5. v6 [diff vs current]

[PATCH v2 3/4] git-p4: Fix t9815 git-p4-submit-fail test case on OS X

From: <hidden>
Date: 2016-06-15 23:06:45
Subsystem: the rest · Maintainer: Linus Torvalds

From: Lars Schneider <redacted>

The stats command works differently on OS X compared to Linux. Detect
OS X and execute the appropriate assertions.

Signed-off-by: Lars Schneider <redacted>
---
 t/t9815-git-p4-submit-fail.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/t/t9815-git-p4-submit-fail.sh b/t/t9815-git-p4-submit-fail.sh
index 4cff6a7..520b812 100755
--- a/t/t9815-git-p4-submit-fail.sh
+++ b/t/t9815-git-p4-submit-fail.sh
@@ -417,8 +417,12 @@ test_expect_success 'cleanup chmod after submit cancel' '
 		! p4 fstat -T action text &&
 		test_path_is_file text+x &&
 		! p4 fstat -T action text+x &&
-		if test_have_prereq !CYGWIN
-		then
+		if test_have_prereq CYGWIN; then
+			: # NOOP
+		elif test_have_prereq DARWIN; then
+			stat -f %Sp text | egrep ^-r-- &&
+			stat -f %Sp text+x | egrep ^-r-x
+		else
 			stat --format=%A text | egrep ^-r-- &&
 			stat --format=%A text+x | egrep ^-r-x
 		fi
-- 
2.5.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help