Hash :
ea93d8d0
Author :
Date :
2012-07-07T12:08:05
tests: move 'runtest' into the top-level directory Move our wrapper script 'runtest' (meant to allow the execution of Automake test cases from the command line) from the 't/ax/' directory to the top-level one. This makes the script easier to find and to invoke. Much more importantly, our DejaGNU-checking test cases won't try anymore to use that script instead of the 'runtest' program provided by DejaGNU (that happened because '$(srcdir)/t/ax/' is automatically added early to the $PATH variable in our test cases), which was causing spurious SKIPs. * t/ax/runtest.in: Move ... * runtest.in: ... here. * Makefile.am, t/README, .gitignore: Adjust. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
#!@AM_TEST_RUNNER_SHELL@
#
# Copyright (C) 2012 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Run an Automake test from the command line.
# Usage:
set -e; set -u
: ${AM_TEST_RUNNER_SHELL='@AM_TEST_RUNNER_SHELL@'}
: ${AM_PROVE_CMD='prove'}
: ${AM_PROVEFLAGS='--merge --verbose'}
: ${srcdir='@srcdir@'}
error () { echo "$0: $*" >&2; exit 255; }
# Some shell flags should be passed over to the test scripts.
#while test $# -gt 0; do
# case $1 in
# --help) echo "Usage: $0 [SHELL-OPTIONS] TEST [TEST-OPTIONS]"; exit $?;;
# -*)
# esac
#done
test $# -gt 0 || error "missing argument"
tst=$1; shift
case $tst in
*.sh) wrapper () { exec "$@"; };;
*.tap) wrapper () { exec "$AM_PROVE_CMD" $AM_PROVEFLAGS -e "$@"; };;
*) error "test '$tst' has an unrecognized extension";;
esac
case $tst in
/*) ;;
*) if test -f ./$tst; then
tst=./$tst
# Support for VPATH build.
elif test -f $srcdir/$tst; then
tst=$srcdir/$tst
else
error "could not find test '$tst'"
fi
;;
esac
wrapper "$AM_TEST_RUNNER_SHELL" "$tst" "$@"
error "dead code reached"