#! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-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
# TAP support:
# - a test script terminated by a signal causes an hard error
-am_parallel_tests=yes
-. ./defs || Exit 1
+. test-init.sh
fetch_tap_driver
END
echo TESTS += signal-$sig.test >> Makefile.am
done
-results_count=`ls *.test | wc -l | tr -d "$tab$sp"`
+results_count=$(ls *.test | wc -l | tr -d "$tab$sp")
chmod a+x *.test
./configure
-system=`uname -s -r || echo unknown` # Needed later.
+system=$(uname -s -r || echo unknown) # Needed later.
signal_caught ()
{
command_ok_ '"make check" fails' eval '
(
- st=0; $MAKE check >stdout || st=$?
- cat stdout
+ run_make -e IGNORE -O check
# Extra "echo" and silencing of xtraces required to avoid possible
# garbled output with NetBSD make, which would miss some final
# newlines in the expected places and thus mess up our TAP output.
set +x; echo
- test $st -gt 0
+ test $am_make_rc -gt 0
)
'
cat stdout # For debugging.
command_ok_ "count of test results" count_test_results \
- total=`expr $results_count '*' 2` \
+ total=$(($results_count * 2)) \
pass=$results_count error=$results_count \
fail=0 xpass=0 xfail=0 skip=0
echo 'TEST_LOG_DRIVER_FLAGS = --ignore-exit' >> Makefile
-command_ok_ '"make check" passes [--ignore-exit]' eval '$MAKE check >stdout'
-cat stdout # For debugging.
+command_ok_ '"make check" passes [--ignore-exit]' run_make -O check
command_ok_ "count of test results [--ignore-exit]" count_test_results \
total=$results_count pass=$results_count \