]>
Commit | Line | Data |
---|---|---|
0a392cb8 MV |
1 | #!/bin/sh |
2 | ||
2579e1d2 | 3 | failed_tests= |
0a392cb8 MV |
4 | fixed=0 |
5 | success=0 | |
6 | failed=0 | |
7 | broken=0 | |
8 | total=0 | |
9 | ||
6508eedf | 10 | while read file |
0a392cb8 MV |
11 | do |
12 | while read type value | |
13 | do | |
300072f4 JH |
14 | case $type in |
15 | '') | |
16 | continue ;; | |
0a392cb8 MV |
17 | fixed) |
18 | fixed=$(($fixed + $value)) ;; | |
19 | success) | |
20 | success=$(($success + $value)) ;; | |
21 | failed) | |
2579e1d2 JL |
22 | failed=$(($failed + $value)) |
23 | if test $value != 0 | |
24 | then | |
25 | testnum=$(expr "$file" : 'test-results/\(t[0-9]*\)-') | |
26 | failed_tests="$failed_tests $testnum" | |
27 | fi | |
28 | ;; | |
0a392cb8 | 29 | broken) |
300072f4 | 30 | broken=$(($broken + $value)) ;; |
0a392cb8 | 31 | total) |
300072f4 | 32 | total=$(($total + $value)) ;; |
0a392cb8 MV |
33 | esac |
34 | done <"$file" | |
35 | done | |
36 | ||
2579e1d2 JL |
37 | if test -n "$failed_tests" |
38 | then | |
39 | printf "\nfailed test(s):$failed_tests\n\n" | |
40 | fi | |
41 | ||
0a392cb8 MV |
42 | printf "%-8s%d\n" fixed $fixed |
43 | printf "%-8s%d\n" success $success | |
44 | printf "%-8s%d\n" failed $failed | |
45 | printf "%-8s%d\n" broken $broken | |
46 | printf "%-8s%d\n" total $total |