view modules/acl-tests @ 17970:44acb0031ca8

file-has-acl: new module, split from acl And add a new module file-has-acl-tests to match. I ran into a problem with the recent changes to the acl module, as they introduced a typo 'test use_xattrs = 0' into 'configure'. When using the fixed version with Emacs, I discovered that file-has-acl wasn't separated out well enough for Emacs (e.g., it had multiple libraries, but needed only one), so I fixed that too. * NEWS: Document this incompatible change. * modules/file-has-acl, modules/file-has-acl-tests: New files. * m4/acl.m4 (gl_FUNC_ACL_ARG): New macro, split from gl_FUNC_ACL. Initialize gl_need_lib_has_acl. (gl_FUNC_ACL): Require it. Simplify use of 'test'. Set LIB_HAS_ACL if gl_need_lib_has_acl. Move the file-has-acl.c-relevant stuff to ... (gl_FILE_HAS_ACL): ... this new macro. Rewrite to fix 'test use_xattrs = 0' typo, and omit some needless work. Set gl_need_lib_has_acl=1 if we'll need LIB_HAS_ACL to be set when gl_FUNC_ACL is called. * modules/acl (Files, lib_SOURCES): Remove lib/file-has-acl.c. (Link): Remove $(LIB_HAS_ACL). * modules/acl-tests (Files, Depends-on, configure.ac, TESTS) (check_PROGRAMS): Move stuff relevant to file-has-acl to modules/file-has-acl-tests. (test_file_has_acl_LDADD): Move to modules/file-has-acl-tests.
author Paul Eggert <eggert@cs.ucla.edu>
date Fri, 24 Apr 2015 22:07:56 -0700
parents 3acf9fb3aa69
children ae28326ff93e
line wrap: on
line source

Files:
tests/test-set-mode-acl.sh
tests/test-set-mode-acl-1.sh
tests/test-set-mode-acl-2.sh
tests/test-copy-acl.sh
tests/test-copy-acl-1.sh
tests/test-copy-acl-2.sh
tests/test-set-mode-acl.c
tests/test-copy-acl.c
tests/test-sameacls.c
tests/macros.h

Depends-on:
file-has-acl-tests
progname
read-file
unistd
xalloc

configure.ac:

Makefile.am:
TESTS += \
  test-set-mode-acl.sh test-set-mode-acl-1.sh test-set-mode-acl-2.sh \
  test-copy-acl.sh test-copy-acl-1.sh test-copy-acl-2.sh
TESTS_ENVIRONMENT += USE_ACL=$(USE_ACL)
check_PROGRAMS += test-set-mode-acl test-copy-acl test-sameacls
test_set_mode_acl_LDADD = $(LDADD) $(LIB_ACL) @LIBINTL@
test_copy_acl_LDADD = $(LDADD) $(LIB_ACL) @LIBINTL@
test_sameacls_LDADD = $(LDADD) $(LIB_ACL) @LIBINTL@