1 #!@AM_TEST_RUNNER_SHELL@
3 # Copyright (C) 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 # Run an Automake test from the command line.
23 : ${AM_TEST_RUNNER_SHELL='@AM_TEST_RUNNER_SHELL@'}
24 : ${AM_PROVE_CMD='prove'}
25 : ${AM_PROVEFLAGS='--merge --verbose'}
26 : ${srcdir='@srcdir@'}
28 error () { echo "$0: $*" >&2; exit 255; }
30 # Some shell flags should be passed over to the test scripts.
31 #while test $# -gt 0; do
33 # --help) echo "Usage: $0 [SHELL-OPTIONS] TEST [TEST-OPTIONS]"; exit $?;;
38 test $# -gt 0 || error "missing argument"
43 *.sh) wrapper () { exec "$@"; };;
44 *.tap) wrapper () { exec "$AM_PROVE_CMD" $AM_PROVEFLAGS -e "$@"; };;
45 *) error "test '$tst' has an unrecognized extension";;
50 *) if test -f ./$tst; then
52 # Support for VPATH build.
53 elif test -f $srcdir/$tst; then
56 error "could not find test '$tst'"
61 wrapper "$AM_TEST_RUNNER_SHELL" "$tst" "$@"
62 error "dead code reached"