From: Bruno Haible Date: Mon, 5 Sep 2011 09:25:09 +0000 (+0200) Subject: copy-file: Try unit tests on more file systems. X-Git-Tag: v0.1~1957 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=2c53fc42a02ccb53023521043c774769b057cbfb;p=gnulib.git copy-file: Try unit tests on more file systems. * tests/test-copy-file-1.sh: New file. * tests/test-copy-file-2.sh: New file. * modules/copy-file-tests (Files): Add them. (Makefile.am): Add them to TESTS. --- diff --git a/ChangeLog b/ChangeLog index fcc419d8d8..1a141528b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2011-09-05 Bruno Haible + copy-file: Try unit tests on more file systems. + * tests/test-copy-file-1.sh: New file. + * tests/test-copy-file-2.sh: New file. + * modules/copy-file-tests (Files): Add them. + (Makefile.am): Add them to TESTS. + acl: Try unit tests on more file systems. * tests/test-file-has-acl-1.sh: New file. * tests/test-file-has-acl-2.sh: New file. diff --git a/modules/copy-file-tests b/modules/copy-file-tests index ab7f6324e7..cc06a0bb50 100644 --- a/modules/copy-file-tests +++ b/modules/copy-file-tests @@ -1,5 +1,7 @@ Files: tests/test-copy-file.sh +tests/test-copy-file-1.sh +tests/test-copy-file-2.sh tests/test-copy-file.c tests/macros.h @@ -13,7 +15,7 @@ xalloc configure.ac: Makefile.am: -TESTS += test-copy-file.sh +TESTS += test-copy-file.sh test-copy-file-1.sh test-copy-file-2.sh TESTS_ENVIRONMENT += USE_ACL=$(USE_ACL) check_PROGRAMS += test-copy-file test_copy_file_LDADD = $(LDADD) $(LIB_ACL) @LIBINTL@ diff --git a/tests/test-copy-file-1.sh b/tests/test-copy-file-1.sh new file mode 100755 index 0000000000..b38c8216c2 --- /dev/null +++ b/tests/test-copy-file-1.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# Test copy-file on the file system of /var/tmp, which usually is a local +# file system. + +if test -d /var/tmp; then + TMPDIR=/var/tmp +else + TMPDIR=/tmp +fi +export TMPDIR + +exec "${srcdir}/test-copy-file.sh" diff --git a/tests/test-copy-file-2.sh b/tests/test-copy-file-2.sh new file mode 100755 index 0000000000..d4d959f8c6 --- /dev/null +++ b/tests/test-copy-file-2.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# Test copy-file on the file system of the build directory, which may be +# a local file system or NFS mounted. + +TMPDIR=`pwd` +export TMPDIR + +exec "${srcdir}/test-copy-file.sh"