diff options
Diffstat (limited to 'tests/defs')
-rw-r--r-- | tests/defs | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/tests/defs b/tests/defs index d3f6de0eb..2dca4cfb6 100644 --- a/tests/defs +++ b/tests/defs @@ -117,20 +117,19 @@ Exit () exit $1 } -# Print warnings (e.g., about skipped and failed tests) to this file -# number. Override by putting, say: -# stderr_fileno_=9; export stderr_fileno_; exec 9>&2; -# in the definition of AM_TESTS_ENVIRONMENT. -# This is useful when using automake's parallel tests mode, to print the -# reason for skip/failure to console, rather than to the *.log files. -: ${stderr_fileno_=2} - -# Copied from Gnulib's `tests/init.sh'. -warn_ () { echo "$@" 1>&$stderr_fileno_; } -fail_ () { warn_ "$me: failed test: $@"; Exit 1; } -skip_ () { warn_ "$me: skipped test: $@"; Exit 77; } -fatal_ () { warn_ "$me: hard error: $@"; Exit 99; } -framework_failure_ () { warn_ "$me: set-up failure: $@"; Exit 99; } +if test $using_tap = yes; then + funcs_file_=tap-functions.sh +else + funcs_file_=plain-functions.sh +fi + +if test -f "$testsrcdir/$funcs_file_"; then + . "$testsrcdir/$funcs_file_" +else + echo "$me: $testsrcdir/$funcs_file_ not found, check \$testsrcdir" >&2 + Exit 99 +fi +unset funcs_file_ # cross_compiling # --------------- @@ -641,8 +640,10 @@ if test "$sh_errexit_works" = yes; then rm -rf $testSubDir ;; esac + set +x test "$signal" != 0 && echo "$me: caught signal $signal" echo "$me: exit $exit_status" + test $using_tap = yes && late_plan_ exit $exit_status ' 0 for signal in 1 2 13 15; do |