changeset 15569:bc7d656f8f54

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.
author Bruno Haible <bruno@clisp.org>
date Mon, 05 Sep 2011 11:25:09 +0200
parents 3acf9fb3aa69
children cd0bdf15a524
files ChangeLog modules/copy-file-tests tests/test-copy-file-1.sh tests/test-copy-file-2.sh
diffstat 4 files changed, 31 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2011-09-05  Bruno Haible  <bruno@clisp.org>
 
+	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.
--- 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 @@
 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@
new file mode 100755
--- /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"
new file mode 100755
--- /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"