A simple script to parse the results from the testcases
This is a simple script that aggregates key:value pairs in a file. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Miklos Vajna committed
Jun 8, 2008 at 16:04 UTC
0a392cb8cb4df41a82ac75e1052587b9a2c6f393
1 file changed
+34
t/aggregate-results.sh
new
+34
@@ -0,0 +1,34 @@
1
+#!/bin/sh
2
+
3
+fixed=0
4
+success=0
5
+failed=0
6
+broken=0
7
+total=0
8
+
9
+for file
10
+do
11
+ while read type value
12
+ do
13
+ case $type in
14
+ '')
15
+ continue ;;
16
+ fixed)
17
+ fixed=$(($fixed + $value)) ;;
18
+ success)
19
+ success=$(($success + $value)) ;;
20
+ failed)
21
+ failed=$(($failed + $value)) ;;
22
+ broken)
23
+ broken=$(( $broken + $value)) ;;
24
+ total)
25
+ total=$(( $total + $value)) ;;
26
+ esac
27
+ done <"$file"
28
+done
29
+
30
+printf "%-8s%d\n" fixed $fixed
31
+printf "%-8s%d\n" success $success
32
+printf "%-8s%d\n" failed $failed
33
+printf "%-8s%d\n" broken $broken
34
+printf "%-8s%d\n" total $total