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

[PATCH v1 1/2] git-p4: Improve test case portability for t9815 git-p4-submit-fail

From
larsxschneider@gmail.com <larsxschneider@gmail.com>
Date
Oct 12, 2015, 17:03 UTC
Message-ID
<1444669384-85419-2-git-send-email-larsxschneider@gmail.com>
In-Reply-To
<1444669384-85419-1-git-send-email-larsxschneider@gmail.com>
From: Lars Schneider <larsxschneider@gmail.com>

Replace the stats command with the ls command to check file mode bits. The stats command is not available on Windows and has different command line options on OS X.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
---
 t/t9815-git-p4-submit-fail.sh | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/t/t9815-git-p4-submit-fail.sh b/t/t9815-git-p4-submit-fail.sh
index 4cff6a7..37b42d0 100755
--- a/t/t9815-git-p4-submit-fail.sh
+++ b/t/t9815-git-p4-submit-fail.sh
@@ -417,11 +417,8 @@ 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
-			stat --format=%A text | egrep ^-r-- &&
-			stat --format=%A text+x | egrep ^-r-x
-		fi
+		ls -l text | egrep ^-r-- &&
+		ls -l text+x | egrep ^-r-x
 	)
 '
 
-- 
2.5.1
Previous: larsxschneider@gmail.comNext: larsxschneider@gmail.com
Message 2 of 4 in “git-p4: Fix tests on OS X”
  1. 0/2 git-p4: Fix tests on OS Xlarsxschneider@gmail.com, Oct 12, 2015
  2. 1/2 git-p4: Improve test case portability for t9815 git-p4-submit-faillarsxschneider@gmail.com, Oct 12, 2015
  3. 2/2 git-p4: Skip t9819 test case on case insensitive file systemslarsxschneider@gmail.com, Oct 12, 2015
  4. Luke DiamandOct 22, 2015

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.