3 # (C) 2010 Free Software Foundation
4 # Written by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6 # This script is Free Software, and it can be copied, distributed and
7 # modified as defined in the GNU General Public License. A copy of
8 # its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
15 Usage: $PROGNAME [-h] [-n] DIR|FILE.sum...
17 Rerun unsuccessful tests for testsuites below DIR or for FILE.sum.
19 -h display this help and exit
20 -n dry run, only show what would be run
37 -*) error
"unknown argument $arg" ;;
41 test $# -gt 0 || usage
44 if test -z "$AWK" ; then
45 for AWK
in gawk nawk
awk
47 if type $AWK 2>&1 |
grep 'not found' > /dev
/null
2>&1 ; then
58 files
=`find "$@" -name \*.sum$filesuffix -print | grep testsuite | sort`
61 for file in $files; do
62 dir
=`echo $file | sed 's,/[^/]*$,,'`
63 base
=`echo $file | sed 's,.*/,,; s,\.sum$,,'`
65 /^Running .*\.exp \.\.\./ {
66 if (expfile != "" && tests != "")
67 printf (" %s=\"%s\"", expfile, tests)
69 sub (/^[^ ]*\//, "", expfile)
73 /^(FAIL|XPASS|UNRESOLVED|WARNING|ERROR): / {
74 if (test != $2 "" && $2 != "" ) {
76 tests = tests sep test
81 if (expfile != "" && tests != "")
82 printf (" %s=\"%s\"", expfile, tests)
84 if test -n "$flags"; then
87 if grep '^AM_RUNTESTFLAGS =' Makefile
>/dev
/null
2>&1; then
88 amflags
=`echo 'print-runtestflags: ; @echo $(AM_RUNTESTFLAGS)' \
89 | ${MAKE} -s -f Makefile -f - print-runtestflags`
91 echo "(cd $dir && runtest $amflags --tool $base $flags)"
92 if test -z "$dry"; then
93 eval runtest
--tool $base $flags || st
=$?