3 # Copyright (C) 1996-2012 Free Software Foundation, Inc.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 # *** IMPORTANT NOTE ***
19 # This file should execute correctly with any system's /bin/sh (which
20 # might be just a Bourne shell, non POSIX-conforming, like on Solaris
21 # up to version 11 at least).
23 # Ensure we are running from the right directory.
24 for f in defs-static t/ax/test-init.sh; do
25 if test ! -f ./$f; then
26 echo "$0: ./$f: not found in current directory" >&2
31 # Source the shell static setup and variable definitions.
33 test $? -eq 0 || exit 99
35 # Make sure we run with the shell detected at configure time or forced
36 # by the user (unless the user forbids it). That is assumed to be a
38 case ${AM_TESTS_REEXEC-yes} in
42 # Ensure we can find ourselves.
43 if test ! -f "$0"; then
44 echo "$0: unable to find myself" >&2
47 AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
48 # Cannot simply do "opts=$-", since the content of $- is not
49 # portable among different shells. So try to propagate only
50 # the portable and interesting options.
52 *x*v*|*v*x) opts=-vx;;
57 echo exec $AM_TEST_RUNNER_SHELL $opts "$0" "$*"
58 exec $AM_TEST_RUNNER_SHELL $opts "$0" ${1+"$@"}
59 # This should be dead code, unless some strange error happened.
60 echo "$0: failed to re-execute with $AM_TEST_RUNNER_SHELL" >&2
65 # Source the actual test initialization and setup code, and return
66 # control to the test script that is sourcing us.
67 . "$am_testauxdir/test-init.sh"