From 2c53fc42a02ccb53023521043c774769b057cbfb Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 5 Sep 2011 11:25:09 +0200 Subject: [PATCH] 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. --- ChangeLog | 6 ++++++ modules/copy-file-tests | 4 +++- tests/test-copy-file-1.sh | 13 +++++++++++++ tests/test-copy-file-2.sh | 9 +++++++++ 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100755 tests/test-copy-file-1.sh create mode 100755 tests/test-copy-file-2.sh 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" -- 2.39.5