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 [testname [...]]" >&2; exit 1; }
21 currlen
=`echo -n $gf | perl -pe 's/\.t$//' | wc -c`
22 [ $currlen -gt $maxlen ] && maxlen
=$currlen
27 testname
=`echo -n $testname | perl -pe 's/\.t$//'`
28 printf "%${maxlen}s.t: " $testname
29 .
/$testname.t
2>&1 | remove_perltestnumbers
>log
/$testname.log
30 not_ok_count
=$
(grep "^not ok -" log
/$testname.log |
wc -l |
tr -d ' ')
31 if [ $not_ok_count -gt 0 ]; then
32 not_ok_str
=", $not_ok_count not ok"
37 ok_count
=$
(grep "^ok -" log
/$testname.log |
wc -l)
38 printf "%3u ok%s\\n" $ok_count "$not_ok_str"
39 tot_ok
=$
(($tot_ok + $ok_count))
40 tot_not_ok
=$
(($tot_not_ok + $not_ok_count))
41 grep -q "^not ok -" log
/$testname.log
&& {
43 grep "^not ok -" log
/$testname.log
48 printf " %${maxlen}s: %u ok, %u not ok\n" "total" $tot_ok $tot_not_ok