diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-06-21 13:56:43 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-06-21 13:56:43 +0200 |
commit | 2ff310174c08e9f3a178cbd3b47ca3e9898ecda5 (patch) | |
tree | 8a301ffb04a2b718f261ff4aef44a3dd93f1061b /t/ax/runtest.in | |
parent | 6f301b5cf58b1bc2ff1ee118086c8f0b3146b5d7 (diff) | |
parent | 177d0392e690eacfbe29bac4d82d30ba6303b304 (diff) | |
download | automake-2ff310174c08e9f3a178cbd3b47ca3e9898ecda5.tar.gz |
Merge branch 'maint' into micro
* maint:
release: stable minor release 1.14
NEWS: one more minor fixlet
maint: port check-minimal-autoconf to VPATH builds
tests: avoid spurious failures in Linux -> MinGW cross-compilation mode
tests: simplify checks for some expected variables values in Makefiles
NEWS: improve and update wording
tests: fix/improve few heading comments
coverage: new test on Texinfo @include support
tests: tighten a grepping check
tests: more significant names for some tests
rename-tests: rework some code for clarity and safety
tests: cosmetic changes in t/extra-sources.sh
rename-tests: inform the user about the pre-filled commit msg
typofix: in comments in 'maintainer/rename-tests'
rename-tests: also "git add" list-of-tests.mk
tests: rename t/exsource.sh -> t/extra-sources.sh
tests: some improvements to Gettext tests
maint: version bump after beta release 1.13b
release: beta release 1.13b (will become 1.14)
automake: assume we can always pass '-o' to the C compiler
NEWS: fix typo
NEWS: on assuming "rm -f" without arguments work
docs: AM_PROG_CC_C_O: correct imprecise statements about it
NEWS: document deprecation of 'shar' and 'compress' dist formats
m4: rename minuso.m4 -> prog-cc-c-o.m4
tests: some tests make no sense if "$CC -c -o" doesn't work
AM_PROG_CC_C_O: don't rely on AC_PROG_CC_C_O, re-implement similar logic
compile: rewrite AC_PROG_CC with AM_PROG_CC_C_O contents
tests: avoid few lingering $MAKE redirections
tests: fix a spurious failure on NetBSD 5.1
texi: build version.texi and stamp-vti in srcdir
tests: fix a botched heading comment
tests: fix another spurious with FreeBSD make
tests: fix a spurious failure with FreeBSD make
tests: remove remaining exec bits ('maint' branch)
PLANS: subdir-objects: various updates
THANKS: update Akim's e-mail address
tests: less uses of "make -e"; avoid spurious failures in 'check-cc-no-c-o'
build: be more respectful of user-specified verbosity
check-cc-no-c-o: unify initializations in a single place
check-cc-no-c-o: avoid a spurious failure
build: fixup for building in a VPATH setup
Use AC_DEFUN_ONCE to define AM_PROG_CC_C_O
compile: avoid AC_PROG_CC messy rewrite
options: tiny simplification in dealing with incompatible versions
options: try to report as much errors as possible
refactor: fix few "inverted boolean" usages
options: better name for an internal function
options: more consistency in use of return statuses to report errors
options: tiny simplification in dealing with erroneous opts
options: consistently use return statuses to report errors
options: re-enable some sanity checks
THANKS: update Eric Blake's e-mail address
NEWS: typofix
news: document new 'subdir-objects' warning
PLANS: one minor fixlet (mostly cosmetic)
PLANS: we have already dropped support for split info files in master
NEWS: fix a reference to Automake 1.14 where Automake 2.0 was intended
PLANS: fix reference to non-existent 'next' branch
PLANS: fix botched version reference
maintcheck: fix two references to old location of aclocal and automake
dist: deprecated shar and tar+compress formats
am: prefer a shorter idiom where possible
maint: re-run "make update-copyright" ...
tests: avoid spurious failure with older flex (2.5.4)
build: move automake and aclocal in 'bin' subdir
build: break up monolithic Makefile.am in subdir-specific fragments
maint branch: we are going to become Automake 1.14
tests: typofixes in comments in t/preproc-c-compile.sh
tests: remove bashism from a test
tests: rename some with more descriptive names
typofix: in comments in t/extra2.sh
tests: fix botched cross-reference in a heading comment
automake: refactoring: factor out common cpp-like flags
NEWS (mint): reflect new Automake versioning scheme
maintcheck: avoid spurious failure
perl: perl subroutine prototypes are problematic, don't use them
maint: more adjustments to the new versioning scheme
cosmetics: fix some "docstring-like" comments in automake
style: call perl functions 'like_this()', not '&like_this()'
preproc: enhance and extend tests
preproc: add support for relative names in included fragments
maint: use more perl subroutines prototypes in the automake script
build: auto-generate perl subroutines prototypes for automake and aclocal
refactor: rip module Automake::Language out of automake script
tests: more information about Lex and Yacc programs
lint: fix spurious failure for 'sc_rm_minus_f' syntax check
maint: bump version 1.13.1a -> 1.13.2a
plans: we are not going to remove AM_PROG_MKDIR_P in Automake 1.14
init.m4: add probe to check "rm -f" without args work
subdir-objects: complain if it isn't enabled
plans: update w.r.t. latest changes
ywrap: remove an obsolete FIXME comment
ywrap: style fixes (no semantic change intended)
convenience: "make lint" as an alias for "make maintainer-check"
docs: typofix in manual
coverage: using multiple lexers in a single program
tests: remove most uses of the AM_PROG_CC_C_O obsolete macro
coverage: obsolete macro AM_PROG_CC_C_O should cause no warning nor errors
INSTALL: update copyright years
ithreads: use runtime (not configure time) detection of perl threads
copyright: add few missing copyright notices
maint: files in PLANS are to be exempted from copyright notice
maint: consistently honor the UPDATE_COPYRIGHT_YEAR environment variable
copyright: update some copyright years
compile: use 'compile' script when "-c -o" is used with losing compilers
HACKING: suggest more checks before releasing
tests: can fake a compiler not grasping "-c -o" -- globally in all tests
sync: update files from upstream with "make fetch"
typofix: in comments in GNUmakefile
Rename 'maint/' -> 'maintainer/', for Git's sake
HACKING: minor typofix
HACKING: bug-tracker, the PLANS directory, and how to plan "big" changes
HACKING: rewindable branches should live in the 'experimental/*' namespace
HACKING: fixlets about git branch rewinding policy
HACKING: commit messages are not to follow GCS ChangeLog rules too strongly
HACKING: "detailed explanation" in commit messages is almost mandatory
HACKING: we use "merge --log" even when merging master
HACKING: typofix
depend2.am: fix comments on verbosity of compilation rules
depend2.am: improve comments a little
plans: automake 1.14 is to assume "rm -f" with no args is OK
plans: we want to active subdir-objects unconditionally in automake 1.14
tests: adjust stale references to old test names
tests: rename the last aclocal test with dumb name
tests: fix an old botched change to an aclocal test
tests: fix some botched inter-test references in heading comments
coverage: compile rules used "-c -o" also with losing compilers
texi: remove extra verbosity in creation of dirstamp directory
coverage: user can avoid distributing '.info' pages
plans: add some on-going plans (already registered on the bug tracker)
docs: mention dist-hook help for EXTRA_DIST
texi: remove workaround for older Texinfo (4.1)
NEWS: improve wordings in entry deprecating suffix-less info files
build: don't enable 'color-tests' automake option explicitly
build: enable all warnings as fatal in our own build system
texi: Texinfo sources and CLEANFILES definition should co-exist peacefully
tests: make two new test executable
runtest: better command line API
tests: move runtest.in away from the top-lever directory
maint: move more maintainer files in the 'maint/' subdir
plans: add the "PLANS" directory
tests: more significant names for some tests
maint: add some of my maintainer-specific scripts
texi: deprecate hack about info files in CLEANFILES variables
texi: info files can be generated in the builddir
Diffstat (limited to 't/ax/runtest.in')
-rw-r--r-- | t/ax/runtest.in | 130 |
1 files changed, 130 insertions, 0 deletions
diff --git a/t/ax/runtest.in b/t/ax/runtest.in new file mode 100644 index 000000000..57ce889c1 --- /dev/null +++ b/t/ax/runtest.in @@ -0,0 +1,130 @@ +#!@AM_TEST_RUNNER_SHELL@ +# @configure_input@ +# +# Copyright (C) 2012-2013 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. + +set -e; set -u + +: ${AM_TEST_RUNNER_SHELL='@AM_TEST_RUNNER_SHELL@'} +: ${AM_PROVE_CMD='prove'} +: ${AM_PROVEFLAGS='--merge --verbose'} +: ${srcdir='@srcdir@'} +: ${abs_srcdir='@abs_srcdir@'} +: ${abs_builddir='@abs_builddir@'} +: ${PATH_SEPARATOR='@PATH_SEPARATOR@'} + +# For sourcing of extra "shell libraries" by our test scripts. As per +# POSIX, sourcing a file with '.' will cause it to be looked up in $PATH +# in case it is given with a relative name containing no slashes. +if test "$srcdir" != .; then + PATH=$abs_srcdir/t/ax$PATH_SEPARATOR$PATH +fi +PATH=$abs_builddir/t/ax$PATH_SEPARATOR$PATH +export PATH + +# For use by the testsuite framework. The Automake test harness +# define this, so we better do the same. +export srcdir + +# Some testsuite-influential variables should be overridable from the +# test scripts, but not from the environment. +# Keep this in sync with the 'Makefile.am:AM_TESTS_ENVIRONMENT'. +for v in \ + required \ + am_test_protocol \ + am_serial_tests \ + am_test_prefer_config_shell \ + am_original_AUTOMAKE \ + am_original_ACLOCAL \ + am_test_lib_sourced \ + test_lib_sourced \ +; do + eval "$v= && unset $v" || exit 1 +done +unset v + +xecho () { printf '%s\n' "$*"; } +error () { echo "$0: $*" >&2; exit 255; } + +# Some shell flags should be passed over to the test scripts. +shell_opts= +while test $# -gt 0; do + case $1 in + --help) + xecho "Usage: $0 [--shell=PATH] [-k] [SHELL-OPTIONS]" \ + "[VAR=VALUE ...] TEST [TEST-OPTIONS]" + exit $? + ;; + --shell) + test $# -gt 1 || error "missing argument for option '$1'" + AM_TEST_RUNNER_SHELL=$2 + shift + ;; + --shell=*) + AM_TEST_RUNNER_SHELL=${1#--shell=} + ;; + -o) + test $# -gt 1 || error "missing argument for option '$1'" + shell_opts="$shell_opts -o $2" + shift + ;; + -k|--keep-testdir|--keep-testdirs) + keep_testdirs=yes; export keep_testdirs;; + -*) + # Assume it is an option to pass through to the shell. + shell_opts="$shell_opts $1";; + *=*) + var=${1%%=*} val=${1#*=} + xecho "$var" | LC_ALL=C grep '^[a-zA-Z_][a-zA-Z0-9_]*$' >/dev/null \ + || error "'$var': invalid variable name" + eval "$var=\$val && export $var" || exit 1 + ;; + *) + break;; + esac + shift +done + +test $# -gt 0 || error "missing argument" + +tst=$1; shift + +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 + +case $tst in + *.sh) + exec $AM_TEST_RUNNER_SHELL $shell_opts "$tst" ${1+"$@"} ;; + *.tap) + exec "$AM_PROVE_CMD" $AM_PROVEFLAGS -e \ + "$AM_TEST_RUNNER_SHELL $shell_opts" "$tst" ${1+"$@"} ;; + *) + error "test '$tst' has an unrecognized extension" ;; +esac + +error "dead code reached" |