3 #=======================================================================
5 # File ID: f12ac9d0-28f3-11e5-9579-fefdb24f8e10
7 # Run all tests, update files in log/ and display the results.
9 # License: GNU General Public License version 2 or later.
10 #=======================================================================
12 [ -z "$1" ] && { echo "Syntax: $0 testname [options] [testname [...]]" >&2; exit 1; }
21 while printf "%s" "$1" |
grep -q ^
-; do
27 currlen
=`echo -n $gf | perl -pe 's/\.t$//' | wc -c`
28 [ $currlen -gt $maxlen ] && maxlen
=$currlen
33 testname
=`echo -n $testname | perl -pe 's/\.t$//'`
34 printf "%${maxlen}s.t: " $testname
35 .
/$testname.t
$opt_str 2>&1 | .
/remove_perltestnumbers
>log
/$testname.log
36 not_ok_count
=$
(grep "^not ok -" log
/$testname.log |
wc -l |
tr -d ' ')
37 if [ $not_ok_count -gt 0 ]; then
38 not_ok_str
=", $not_ok_count not ok"
43 ok_count
=$
(grep "^ok -" log
/$testname.log |
wc -l)
44 printf "%3u ok%s\\n" $ok_count "$not_ok_str"
45 tot_ok
=$
(($tot_ok + $ok_count))
46 tot_not_ok
=$
(($tot_not_ok + $not_ok_count))
47 grep -q "^not ok -" log
/$testname.log
&& {
49 grep "^not ok -" log
/$testname.log
54 printf " %${maxlen}s: %u ok, %u not ok\n" "total" $tot_ok $tot_not_ok