Mercurial > gnulib
changeset 30135:7b4e990d9c2c
avoid spurious test failure when library is built without ACL support
* m4/acl.m4 (USE_ACL): Define as a shell variable, too, for...
* modules/acl-tests (Makefile.am) [TESTS_ENVIRONMENT]: Add USE_ACL.
* tests/test-file-has-acl.sh: Skip if USE_ACL == 0.
* tests/test-copy-acl.sh: Likewise.
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Mon, 15 Sep 2008 14:37:49 +0200 |
parents | a9d2e3c7ee34 |
children | 344142aabdce |
files | ChangeLog m4/acl.m4 modules/acl-tests tests/test-copy-acl.sh tests/test-file-has-acl.sh |
diffstat | 5 files changed, 23 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Sep 16 03:16:11 2008 +0200 +++ b/ChangeLog Mon Sep 15 14:37:49 2008 +0200 @@ -1,3 +1,11 @@ +2008-09-16 Jim Meyering <meyering@redhat.com> + + avoid spurious test failure when library is built without ACL support + * m4/acl.m4 (USE_ACL): Define as a shell variable, too, for... + * modules/acl-tests (Makefile.am) [TESTS_ENVIRONMENT]: Add USE_ACL. + * tests/test-file-has-acl.sh: Skip if USE_ACL == 0. + * tests/test-copy-acl.sh: Likewise. + 2008-09-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * lib/fstrcmp.c (fstrcmp_bounded): Use a second, less quick upper bound
--- a/m4/acl.m4 Tue Sep 16 03:16:11 2008 +0200 +++ b/m4/acl.m4 Mon Sep 15 14:37:49 2008 +0200 @@ -121,6 +121,8 @@ AC_SUBST([LIB_ACL]) AC_DEFINE_UNQUOTED([USE_ACL], [$use_acl], [Define to nonzero if you want access control list support.]) + USE_ACL=$use_acl + AC_SUBST([USE_ACL]) ]) # gl_ACL_GET_FILE(IF-WORKS, IF-NOT)
--- a/modules/acl-tests Tue Sep 16 03:16:11 2008 +0200 +++ b/modules/acl-tests Mon Sep 15 14:37:49 2008 +0200 @@ -17,7 +17,7 @@ Makefile.am: TESTS += test-file-has-acl.sh test-set-mode-acl.sh test-copy-acl.sh -TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' +TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' USE_ACL=$(USE_ACL) check_PROGRAMS += test-file-has-acl test-set-mode-acl test-copy-acl test-sameacls test_file_has_acl_LDADD = $(LDADD) $(LIB_ACL) test_set_mode_acl_LDADD = $(LDADD) $(LIB_ACL) @LIBINTL@
--- a/tests/test-copy-acl.sh Tue Sep 16 03:16:11 2008 +0200 +++ b/tests/test-copy-acl.sh Mon Sep 15 14:37:49 2008 +0200 @@ -3,6 +3,12 @@ # Show all commands when run with environment variable VERBOSE=yes. test -z "$VERBOSE" || set -x +test "$USE_ACL" = 0 && + { + echo "Skipping test: insufficient ACL support" + exit 77 + } + # func_tmpdir # creates a temporary directory. # Sets variable
--- a/tests/test-file-has-acl.sh Tue Sep 16 03:16:11 2008 +0200 +++ b/tests/test-file-has-acl.sh Mon Sep 15 14:37:49 2008 +0200 @@ -3,6 +3,12 @@ # Show all commands when run with environment variable VERBOSE=yes. test -z "$VERBOSE" || set -x +test "$USE_ACL" = 0 && + { + echo "Skipping test: insufficient ACL support" + exit 77 + } + # func_tmpdir # creates a temporary directory. # Sets variable