Skip tests that require a filesystem that obeys POSIX permissions
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
This commit is contained in:
parent
2718e852e9
commit
ee9fb68c39
@ -15,7 +15,7 @@ test_expect_success setup '
|
||||
|
||||
'
|
||||
|
||||
test_expect_success 'write-tree should notice unwritable repository' '
|
||||
test_expect_success POSIXPERM 'write-tree should notice unwritable repository' '
|
||||
|
||||
(
|
||||
chmod a-w .git/objects .git/objects/?? &&
|
||||
@ -27,7 +27,7 @@ test_expect_success 'write-tree should notice unwritable repository' '
|
||||
|
||||
'
|
||||
|
||||
test_expect_success 'commit should notice unwritable repository' '
|
||||
test_expect_success POSIXPERM 'commit should notice unwritable repository' '
|
||||
|
||||
(
|
||||
chmod a-w .git/objects .git/objects/?? &&
|
||||
@ -39,7 +39,7 @@ test_expect_success 'commit should notice unwritable repository' '
|
||||
|
||||
'
|
||||
|
||||
test_expect_success 'update-index should notice unwritable repository' '
|
||||
test_expect_success POSIXPERM 'update-index should notice unwritable repository' '
|
||||
|
||||
(
|
||||
echo 6O >file &&
|
||||
@ -52,7 +52,7 @@ test_expect_success 'update-index should notice unwritable repository' '
|
||||
|
||||
'
|
||||
|
||||
test_expect_success 'add should notice unwritable repository' '
|
||||
test_expect_success POSIXPERM 'add should notice unwritable repository' '
|
||||
|
||||
(
|
||||
echo b >file &&
|
||||
|
@ -26,7 +26,7 @@ modebits () {
|
||||
|
||||
for u in 002 022
|
||||
do
|
||||
test_expect_success "shared=1 does not clear bits preset by umask $u" '
|
||||
test_expect_success POSIXPERM "shared=1 does not clear bits preset by umask $u" '
|
||||
mkdir sub && (
|
||||
cd sub &&
|
||||
umask $u &&
|
||||
@ -54,7 +54,7 @@ test_expect_success 'shared=all' '
|
||||
test 2 = $(git config core.sharedrepository)
|
||||
'
|
||||
|
||||
test_expect_success 'update-server-info honors core.sharedRepository' '
|
||||
test_expect_success POSIXPERM 'update-server-info honors core.sharedRepository' '
|
||||
: > a1 &&
|
||||
git add a1 &&
|
||||
test_tick &&
|
||||
@ -85,7 +85,7 @@ do
|
||||
git config core.sharedrepository "$u" &&
|
||||
umask 0277 &&
|
||||
|
||||
test_expect_success "shared = $u ($y) ro" '
|
||||
test_expect_success POSIXPERM "shared = $u ($y) ro" '
|
||||
|
||||
rm -f .git/info/refs &&
|
||||
git update-server-info &&
|
||||
@ -97,7 +97,7 @@ do
|
||||
'
|
||||
|
||||
umask 077 &&
|
||||
test_expect_success "shared = $u ($x) rw" '
|
||||
test_expect_success POSIXPERM "shared = $u ($x) rw" '
|
||||
|
||||
rm -f .git/info/refs &&
|
||||
git update-server-info &&
|
||||
@ -111,7 +111,7 @@ do
|
||||
|
||||
done
|
||||
|
||||
test_expect_success 'git reflog expire honors core.sharedRepository' '
|
||||
test_expect_success POSIXPERM 'git reflog expire honors core.sharedRepository' '
|
||||
git config core.sharedRepository group &&
|
||||
git reflog expire --all &&
|
||||
actual="$(ls -l .git/logs/refs/heads/master)" &&
|
||||
|
@ -179,7 +179,7 @@ test_expect_success 'git add --refresh' '
|
||||
test -z "`git diff-index HEAD -- foo`"
|
||||
'
|
||||
|
||||
test_expect_success 'git add should fail atomically upon an unreadable file' '
|
||||
test_expect_success POSIXPERM 'git add should fail atomically upon an unreadable file' '
|
||||
git reset --hard &&
|
||||
date >foo1 &&
|
||||
date >foo2 &&
|
||||
@ -190,7 +190,7 @@ test_expect_success 'git add should fail atomically upon an unreadable file' '
|
||||
|
||||
rm -f foo2
|
||||
|
||||
test_expect_success 'git add --ignore-errors' '
|
||||
test_expect_success POSIXPERM 'git add --ignore-errors' '
|
||||
git reset --hard &&
|
||||
date >foo1 &&
|
||||
date >foo2 &&
|
||||
@ -201,7 +201,7 @@ test_expect_success 'git add --ignore-errors' '
|
||||
|
||||
rm -f foo2
|
||||
|
||||
test_expect_success 'git add (add.ignore-errors)' '
|
||||
test_expect_success POSIXPERM 'git add (add.ignore-errors)' '
|
||||
git config add.ignore-errors 1 &&
|
||||
git reset --hard &&
|
||||
date >foo1 &&
|
||||
@ -212,7 +212,7 @@ test_expect_success 'git add (add.ignore-errors)' '
|
||||
'
|
||||
rm -f foo2
|
||||
|
||||
test_expect_success 'git add (add.ignore-errors = false)' '
|
||||
test_expect_success POSIXPERM 'git add (add.ignore-errors = false)' '
|
||||
git config add.ignore-errors 0 &&
|
||||
git reset --hard &&
|
||||
date >foo1 &&
|
||||
|
@ -69,7 +69,7 @@ test_expect_success '--no-verify with failing hook' '
|
||||
'
|
||||
|
||||
chmod -x "$HOOK"
|
||||
test_expect_success 'with non-executable hook' '
|
||||
test_expect_success POSIXPERM 'with non-executable hook' '
|
||||
|
||||
echo "content" >> file &&
|
||||
git add file &&
|
||||
@ -77,7 +77,7 @@ test_expect_success 'with non-executable hook' '
|
||||
|
||||
'
|
||||
|
||||
test_expect_success '--no-verify with non-executable hook' '
|
||||
test_expect_success POSIXPERM '--no-verify with non-executable hook' '
|
||||
|
||||
echo "more content" >> file &&
|
||||
git add file &&
|
||||
|
@ -136,7 +136,7 @@ test_expect_success '--no-verify with failing hook (editor)' '
|
||||
'
|
||||
|
||||
chmod -x "$HOOK"
|
||||
test_expect_success 'with non-executable hook' '
|
||||
test_expect_success POSIXPERM 'with non-executable hook' '
|
||||
|
||||
echo "content" >> file &&
|
||||
git add file &&
|
||||
@ -144,7 +144,7 @@ test_expect_success 'with non-executable hook' '
|
||||
|
||||
'
|
||||
|
||||
test_expect_success 'with non-executable hook (editor)' '
|
||||
test_expect_success POSIXPERM 'with non-executable hook (editor)' '
|
||||
|
||||
echo "content again" >> file &&
|
||||
git add file &&
|
||||
@ -153,7 +153,7 @@ test_expect_success 'with non-executable hook (editor)' '
|
||||
|
||||
'
|
||||
|
||||
test_expect_success '--no-verify with non-executable hook' '
|
||||
test_expect_success POSIXPERM '--no-verify with non-executable hook' '
|
||||
|
||||
echo "more content" >> file &&
|
||||
git add file &&
|
||||
@ -161,7 +161,7 @@ test_expect_success '--no-verify with non-executable hook' '
|
||||
|
||||
'
|
||||
|
||||
test_expect_success '--no-verify with non-executable hook (editor)' '
|
||||
test_expect_success POSIXPERM '--no-verify with non-executable hook (editor)' '
|
||||
|
||||
echo "even more content" >> file &&
|
||||
git add file &&
|
||||
|
@ -687,6 +687,10 @@ case $(uname -s) in
|
||||
pwd () {
|
||||
builtin pwd -W
|
||||
}
|
||||
# no POSIX permissions
|
||||
;;
|
||||
*)
|
||||
test_set_prereq POSIXPERM
|
||||
;;
|
||||
esac
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user