avoid spurious test failure when library is built without ACL support
authorJim Meyering <meyering@redhat.com>
Mon, 15 Sep 2008 12:37:49 +0000 (14:37 +0200)
committerJim Meyering <meyering@redhat.com>
Tue, 16 Sep 2008 08:08:02 +0000 (10:08 +0200)
* 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.

ChangeLog
m4/acl.m4
modules/acl-tests
tests/test-copy-acl.sh
tests/test-file-has-acl.sh

index 375d43f57280e7779e00fbd4a3d845b5b077de4e..41b8c5d27846f74ea199caafd9ad8efaa431359c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 494ce4bebb7822c542e7ae2b3fdec1860b44e9e0..08342d03ca5d78104b76357a561719d1f962696b 100644 (file)
--- a/m4/acl.m4
+++ b/m4/acl.m4
@@ -121,6 +121,8 @@ int type = ACL_TYPE_EXTENDED;]],
   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)
index 04e004cfd8949a9769222f9d39dac784a364a464..0aacd4141b534cc4dbdbc385d4961e41f079b482 100644 (file)
@@ -17,7 +17,7 @@ configure.ac:
 
 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@
index 6d59702681362eebd76a70af694762b277a81636..9e20e77cd287fcf6f75c4c12cb4f18cd7c88c726 100755 (executable)
@@ -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
index e2dbe9d084df3d3c93068756e552a99e8b7b0482..9783960823c9fa10b3843cda11ea51ef8ad9f440 100755 (executable)
@@ -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