comparison tests/test-copy-file-1.sh @ 40156:066c585853e5

tests: Accommodate a shell that is not in /bin/sh. * tests/init.sh (setup_): Set srcdir and builddir. (BOURNE_SHELL): New variable. * modules/acl-tests (Depends-on): Add 'test-framework-sh'. * modules/file-has-acl-tests (Depends-on): Likewise. * modules/copy-file-tests (Depends-on): Likewise. * tests/test-set-mode-acl-1.sh: Use the test framework. Invoke shell scripts through $BOURNE_SHELL. * tests/test-set-mode-acl-2.sh: Likewise. * tests/test-copy-acl-1.sh: Likewise. * tests/test-copy-acl-2.sh: Likewise. * tests/test-file-has-acl-1.sh: Likewise. * tests/test-file-has-acl-2.sh: Likewise. * tests/test-copy-file-1.sh: Likewise. * tests/test-copy-file-2.sh: Likewise. * tests/test-set-mode-acl.sh (builddir): Consider value set by the invoker. * tests/test-copy-acl.sh (builddir): Likewise. * tests/test-file-has-acl.sh (builddir): Likewise. * tests/test-copy-file.sh (builddir): Likewise. * tests/test-vc-list-files-cvs.sh: Don't create shims for executables in build-aux/. Instead, invoke shell scripts through $BOURNE_SHELL. * tests/test-vc-list-files-git.sh: Likewise.
author Bruno Haible <bruno@clisp.org>
date Sun, 27 Jan 2019 16:01:23 +0100
parents d50152d6b5d2
children b5d610935bea
comparison
equal deleted inserted replaced
40155:84fd38f4932c 40156:066c585853e5
1 #!/bin/sh 1 #!/bin/sh
2 2
3 # Test copy-file on the file system of /var/tmp, which usually is a local 3 # Test copy-file on the file system of /var/tmp, which usually is a local
4 # file system. 4 # file system.
5
6 . "${srcdir=.}/init.sh"; path_prepend_ .
5 7
6 if test -d /var/tmp; then 8 if test -d /var/tmp; then
7 TMPDIR=/var/tmp 9 TMPDIR=/var/tmp
8 else 10 else
9 TMPDIR=/tmp 11 TMPDIR=/tmp
10 fi 12 fi
11 export TMPDIR 13 export TMPDIR
12 14
13 "${srcdir}/test-copy-file.sh" 15 $BOURNE_SHELL "${srcdir}/test-copy-file.sh"
14 ret1=$? 16 ret1=$?
15 NO_STDERR_OUTPUT=1 "${srcdir}/test-copy-file.sh" 17 NO_STDERR_OUTPUT=1 $BOURNE_SHELL "${srcdir}/test-copy-file.sh"
16 ret2=$? 18 ret2=$?
17 case $ret1 in 19 case $ret1 in
18 77 ) exit $ret2 ;; 20 77 ) Exit $ret2 ;;
19 * ) exit $ret1 ;; 21 * ) Exit $ret1 ;;
20 esac 22 esac