summaryrefslogtreecommitdiff
path: root/t/t9815-git-p4-submit-fail.sh
diff options
context:
space:
mode:
authorPete Wyckoff <pw@padd.com>2013-01-27 03:11:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-01-27 06:00:39 (GMT)
commit4cea4d66083f0f9116674f7ca54418f61bcf17b9 (patch)
treec3b4322140ad6dcaacb414e7ec5f16633c18f389 /t/t9815-git-p4-submit-fail.sh
parente9df0f9c7a7fbaed924273d0a9b502171ed23b7c (diff)
downloadgit-4cea4d66083f0f9116674f7ca54418f61bcf17b9.zip
git-4cea4d66083f0f9116674f7ca54418f61bcf17b9.tar.gz
git-4cea4d66083f0f9116674f7ca54418f61bcf17b9.tar.bz2
git p4 test: use test_chmod for cygwin
This test does a commit that is a pure mode change, submits it to p4 but causes the submit to fail. It verifies that the state in p4 as well as the client directory are both unmodified after the failed submit. On cygwin, "chmod +x" does nothing, so use the test_chmod function to modify the index directly too. Also on cygwin, the executable bit cannot be seen in the filesystem, so avoid that part of the test. The checks of p4 state are still valid, though. Thanks-to: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9815-git-p4-submit-fail.sh')
-rwxr-xr-xt/t9815-git-p4-submit-fail.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/t/t9815-git-p4-submit-fail.sh b/t/t9815-git-p4-submit-fail.sh
index d2b7b3d..1243d96 100755
--- a/t/t9815-git-p4-submit-fail.sh
+++ b/t/t9815-git-p4-submit-fail.sh
@@ -405,8 +405,8 @@ test_expect_success 'cleanup chmod after submit cancel' '
git p4 clone --dest="$git" //depot &&
(
cd "$git" &&
- chmod u+x text &&
- chmod u-x text+x &&
+ test_chmod +x text &&
+ test_chmod -x text+x &&
git add text text+x &&
git commit -m "chmod texts" &&
echo n | test_expect_code 1 git p4 submit
@@ -415,10 +415,13 @@ test_expect_success 'cleanup chmod after submit cancel' '
cd "$cli" &&
test_path_is_file text &&
! p4 fstat -T action text &&
- stat --format=%A text | egrep ^-r-- &&
test_path_is_file text+x &&
! p4 fstat -T action text+x &&
- stat --format=%A text+x | egrep ^-r-x
+ if test_have_prereq NOT_CYGWIN
+ then
+ stat --format=%A text | egrep ^-r-- &&
+ stat --format=%A text+x | egrep ^-r-x
+ fi
)
'