* defs: Use '$argv0' instead of '$0'. With Zsh not started right
away in Bourne-compatibility mode, the latter will be the path not
of the test script itself, but of the file it's currently sourcing
-- i.e., in our case, './defs'. This would cause the automatic
re-execution code to execute './defs' (basically a no-op) rather
than re-run the test correctly.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
;;
*)
# Ensure we can find ourselves.
- if test ! -f "$0"; then
- echo "$0: unable to find myself" >&2
+ if test ! -f "$argv0"; then
+ echo "$argv0: unable to find myself" >&2
exit 99
fi
AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
*x*) opts=-x;;
*) opts=;;
esac
- echo exec $AM_TEST_RUNNER_SHELL $opts "$0" "$*"
- exec $AM_TEST_RUNNER_SHELL $opts "$0" ${1+"$@"}
+ echo exec $AM_TEST_RUNNER_SHELL $opts "$argv0" "$*"
+ exec $AM_TEST_RUNNER_SHELL $opts "$argv0" ${1+"$@"}
# This should be dead code, unless some strange error happened.
- echo "$0: failed to re-execute with $AM_TEST_RUNNER_SHELL" >&2
+ echo "$argv0: failed to re-execute with $AM_TEST_RUNNER_SHELL" >&2
exit 99
;;
esac