@matheusbsbs / matheus-bagliano / commits / 063b7e0cd4
Fork 0

t/t1304-default-acl: change from skip_all=* to prereq skip

Change this test to skip test with test prerequisites, and to do setup work in tests. This improves the skipped statistics on platforms where the test isn't run. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Aug 11, 2010 at 19:04 UTC 063b7e0cd4a9017045fc6323a526e82b670dc740
1 file changed +8 -6
t/t1304-default-acl.sh
+8 -6
@@ -18,9 +18,11 @@ umask 077
18 setfacl_out="$(setfacl -m u:root:rwx . 2>&1)"
19 setfacl_ret=$?
20
21 -if [ $setfacl_ret != 0 ]; then
22 - skip_all="Skipping ACL tests: unable to use setfacl (output: '$setfacl_out'; return code: '$setfacl_ret')"
23 - test_done
21 +if test $setfacl_ret != 0
22 +then
23 + say "Unable to use setfacl (output: '$setfacl_out'; return code: '$setfacl_ret')"
24 +else
25 + test_set_prereq SETFACL
26 fi
27
28 check_perms_and_acl () {
@@ -34,7 +36,7 @@ check_perms_and_acl () {
36
37 dirs_to_set="./ .git/ .git/objects/ .git/objects/pack/"
38
37 -test_expect_success 'Setup test repo' '
39 +test_expect_success SETFACL 'Setup test repo' '
40 setfacl -m d:u::rwx,d:g::---,d:o:---,d:m:rwx $dirs_to_set &&
41 setfacl -m m:rwx $dirs_to_set &&
42 setfacl -m u:root:rwx $dirs_to_set &&
@@ -46,12 +48,12 @@ test_expect_success 'Setup test repo' '
48 git commit -m "init"
49 '
50
49 -test_expect_success 'Objects creation does not break ACLs with restrictive umask' '
51 +test_expect_success SETFACL 'Objects creation does not break ACLs with restrictive umask' '
52 # SHA1 for empty blob
53 check_perms_and_acl .git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391
54 '
55
54 -test_expect_success 'git gc does not break ACLs with restrictive umask' '
56 +test_expect_success SETFACL 'git gc does not break ACLs with restrictive umask' '
57 git gc &&
58 check_perms_and_acl .git/objects/pack/*.pack
59 '