]> git.ipfire.org Git - thirdparty/git.git/blame - t/aggregate-results.sh
hashmap: use *_entry APIs for iteration
[thirdparty/git.git] / t / aggregate-results.sh
CommitLineData
0a392cb8
MV
1#!/bin/sh
2
2579e1d2 3failed_tests=
0a392cb8
MV
4fixed=0
5success=0
6failed=0
7broken=0
8total=0
9
6508eedf 10while read file
0a392cb8
MV
11do
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"
35done
36
2579e1d2
JL
37if test -n "$failed_tests"
38then
39 printf "\nfailed test(s):$failed_tests\n\n"
40fi
41
0a392cb8
MV
42printf "%-8s%d\n" fixed $fixed
43printf "%-8s%d\n" success $success
44printf "%-8s%d\n" failed $failed
45printf "%-8s%d\n" broken $broken
46printf "%-8s%d\n" total $total