* tests/tap-setup.sh: Pass also '-f' option to 'cp' invocations,
so that files that have already been copied in without write
permissions will still be overwritten where needed, instead of
causing a spurious testsuite failure. Issue seen when the
testsuite is run under "distcheck".
* tests/defs (get_shell_script): Remove target file before
overwriting it, for the same reason. Rework code flow a bit
since we are at it.
# of /bin/sh.
get_shell_script ()
{
+ test ! -f "$1" || rm -f "$1" || return 99
if test x"$am_test_prefer_config_shell" = x"yes"; then
- sed "1s|#!.*|#! $SHELL|" "$am_scriptdir/$1" > "$1"
- chmod a+x "$1"
+ sed "1s|#!.*|#! $SHELL|" "$am_scriptdir/$1" > "$1" \
+ && chmod a+x "$1" \
+ || return 99
else
- cp "$am_scriptdir/$1" .
+ cp -f "$am_scriptdir/$1" . || return 99
fi
sed 10q "$1" # For debugging.
}
test ! -f Makefile.am || mv Makefile.am Makefile.am~ \
|| fatal_ "failed to save Makefile.am"
-test -d ../tap-common-setup.dir && cp -Rp ../tap-common-setup.dir/* . \
+test -d ../tap-common-setup.dir && cp -fpR ../tap-common-setup.dir/* . \
|| fatal_ "couldn't get precomputed data files"
fetch_tap_driver