diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2014-12-20 00:01:15 +0100 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2014-12-20 00:01:15 +0100 |
commit | 064a6d543a3735d93b5902ffe79ae0ec14a63b15 (patch) | |
tree | 505dd9d57d4090aace9f7cedaccada81b919f8a9 /lib/test-driver | |
parent | 646c439d3f4e5295317f4368c862825def12b85d (diff) | |
parent | 682c4456e02d18b40c701da0602b5720a2cb6858 (diff) | |
download | automake-064a6d543a3735d93b5902ffe79ae0ec14a63b15.tar.gz |
Merge branch 'master' into ng/master
* master:
Fix stupid typo in test, causing spurious failure
sync: update third-part files from upstream
Make sure AM_INIT_AUTOMAKE has a trailing newline
dist: adjust warning messages about shar and tarZ deprecation
docs: improve description of ${PACKAGE}, ${VERSION}, and similar variables
Fix dumb logic error preventing $install_sh from being be overridden
Automake docs: fix typos and use of British English
Expose automake bug#19311
build: fix race in parallel builds
build: fix race in parallel builds
init: ensure $ac_aux_dir is defined before being used
plans: enabling subdir-object by default is blocked on bug#13928
maint: update copyright (for files in 'master' only)
maint: update copyright years
maint: sync files from upstream ("make fetch")
Typofixes in warning messages and manual
doc: fix encoding error with UTF-8 characters
NEWS: a typofix, and better word wrapping
parallel-tests: avoid possible implicit "make all" in test-suite.log rule
Allow user to extend .PRECIOUS target
cosmetics: remove a couple of extra trailing white spaces
tests: fix a spurious failure on Mac OS X
docs: make clear the JAVA primary is frozen
install-sh: a slightly better diagnostic, and tests enhancements
install-sh: be stricter in catching invalid usages
tests: more significant names for some tests
tests: some cosmetic fixes
tests: more significant names for a test
docs: drop a few obsolescent FIXME/TODO comments, and associated text
testsuite harness: report test exit status in log file
TAP driver: no need to invoke AC_PROG_AWK directly
TAP driver: remove perl implementation (move it into contrib/)
NEWS: stop reporting "new" Automake versioning scheme
post-release: micro version bump to 1.14.1a devel version
release: stable micro release 1.14.1
HACKING: minor clarification
tests: make install-info-dir.sh print more debugging info
tests: remove too-brittle test tap-realtime.sh
maintainer: am-ft: add option to cater to clock skews
sync: update INSTALL, config.guess and config.sub from upstream
TAP driver: cosmetic fixes
cosmetics: fix typo in a user-facing message in tests
automake: account for perl hash order randomization
tests: avoid use of intervals to capitalize letters
cosmetics: untabify the install-sh script
install-sh: assume that "set -f" and "set +f" work...
install-sh: assume ${var:-value} works as expected
install-sh: assume 'dirname' is available and working correctly
distcheck: don't allow overriding of --prefix and --srcdir by the user
tests: expose bug#14991 (relates to 'distcheck')
tests: fix spurious failure when zip is present but unzip is not
tests: fix spurious failure due to localization issues
NEWS: update with the changes since v1.14
docs: correct typos in the fix-timestamp.sh script
python: byte-compile nobase_*_PYTHON files only once
cosmetics: typofix in the 'missing' script
test: avoid false positives in 'cc-no-c-o' script
test harness: improve catching of usage errors in script 'test-driver'
tests: fix a spurious failure on NetBSD-current
am-ft: make the environment available earlier
NEWS: post-release tweaks (for 1.14.x series)
tests: avoid a spurious failure on MacOS X 10.6.8
tests: don't risk hanging on the 'cl' requirement
post-release: micro version bump (1.14a)
post-release: micro version bump (1.14.0a)
release: stable minor release 1.14
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 'lib/test-driver')
-rwxr-xr-x | lib/test-driver | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/lib/test-driver b/lib/test-driver index a4d123920..2eb2fe319 100755 --- a/lib/test-driver +++ b/lib/test-driver @@ -1,7 +1,7 @@ #! /bin/sh # test-driver - basic testsuite driver script. -scriptversion=2012-06-27.10; # UTC +scriptversion=2013-07-13.22; # UTC # Copyright (C) 2011-2014 Free Software Foundation, Inc. # @@ -44,13 +44,12 @@ print_usage () Usage: test-driver --test-name=NAME --log-file=PATH --trs-file=PATH [--expect-failure={yes|no}] [--color-tests={yes|no}] - [--enable-hard-errors={yes|no}] [--] TEST-SCRIPT + [--enable-hard-errors={yes|no}] [--] + TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS] The '--test-name', '--log-file' and '--trs-file' options are mandatory. END } -# TODO: better error handling in option parsing (in particular, ensure -# TODO: $log_file, $trs_file and $test_name are defined). test_name= # Used for reporting. log_file= # Where to save the output of the test script. trs_file= # Where to save the metadata of the test run. @@ -69,10 +68,23 @@ while test $# -gt 0; do --enable-hard-errors) enable_hard_errors=$2; shift;; --) shift; break;; -*) usage_error "invalid option: '$1'";; + *) break;; esac shift done +missing_opts= +test x"$test_name" = x && missing_opts="$missing_opts --test-name" +test x"$log_file" = x && missing_opts="$missing_opts --log-file" +test x"$trs_file" = x && missing_opts="$missing_opts --trs-file" +if test x"$missing_opts" != x; then + usage_error "the following mandatory options are missing:$missing_opts" +fi + +if test $# -eq 0; then + usage_error "missing argument" +fi + if test $color_tests = yes; then # Keep in sync with 'lib/am/color-tests.am:$(am.test-suite.tty-colors)'. red='[0;31m' # Red. @@ -94,11 +106,14 @@ trap "st=143; $do_exit" 15 # Test script is run here. "$@" >$log_file 2>&1 estatus=$? + if test $enable_hard_errors = no && test $estatus -eq 99; then - estatus=1 + tweaked_estatus=1 +else + tweaked_estatus=$estatus fi -case $estatus:$expect_failure in +case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; @@ -107,6 +122,12 @@ case $estatus:$expect_failure in *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac +# Report the test outcome and exit status in the logs, so that one can +# know whether the test passed or failed simply by looking at the '.log' +# file, without the need of also peaking into the corresponding '.trs' +# file (automake bug#11814). +echo "$res $test_name (exit status: $estatus)" >>$log_file + # Report outcome to console. echo "${col}${res}${std}: $test_name" |