Avoid test-copy-file.sh failures when ACL support insufficient.
authorBruno Haible <bruno@clisp.org>
Tue, 13 Jan 2009 23:12:56 +0000 (00:12 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 13 Jan 2009 23:12:56 +0000 (00:12 +0100)
ChangeLog
modules/copy-file-tests
tests/test-copy-file.sh

index dc6ba3b9d73621bb9cec6e65fcc11cf71f695a66..c437096026a3113d615ec40b39e3662d86953a71 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-01-13  Bruno Haible  <bruno@clisp.org>
+
+       Avoid test-copy-file.sh failures when ACL support insufficient.
+       * modules/copy-file-tests (Makefile.am): Pass USE_ACL in
+       TESTS_ENVIRONMENT.
+       * tests/test-copy-file.sh: Skip the ACL comparisons if USE_ACL is 0.
+       Reported by Jim Meyering.
+
 2009-01-13  Bruno Haible  <bruno@clisp.org>
 
        * modules/unistdio/u-printf-args (Files): Add m4/stdint_h.m4 and
index 2d610640103c9fa185439d4035eed348b01b592b..a683dee251f77c7a45b9d622b17799863e867fa4 100644 (file)
@@ -13,6 +13,6 @@ configure.ac:
 
 Makefile.am:
 TESTS += test-copy-file.sh
-TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@'
+TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' USE_ACL=$(USE_ACL)
 check_PROGRAMS += test-copy-file
 test_copy_file_LDADD = $(LDADD) $(LIB_ACL) @LIBINTL@
index 58f9df455e35f791b8684af065475df3f159080b..ad7da7be1d747a3ee593cb96a19883df38fccf94 100755 (executable)
@@ -172,13 +172,15 @@ cd "$builddir" ||
   func_test_copy ()
   {
     "$builddir"/test-copy-file${EXEEXT} "$1" "$2" || exit 1
-    "$builddir"/test-sameacls${EXEEXT}  "$1" "$2" || exit 1
-    func_test_same_acls                 "$1" "$2" || exit 1
+    if test "$USE_ACL" != 0; then
+      "$builddir"/test-sameacls${EXEEXT} "$1" "$2" || exit 1
+      func_test_same_acls                "$1" "$2" || exit 1
+    fi
   }
 
   func_test_copy tmpfile0 tmpfile1
 
-  if test $acl_flavor != none; then
+  if test "$USE_ACL" != 0 && test $acl_flavor != none; then
     # Use a user and group id different from the current one, to avoid
     # redundant/ambiguous ACLs.
     myuid=`id -u`