Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/aggregate-results.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / aggregate-results.sh` 63 lines ยท 1141 bytes Raw Blame History 1 #!/bin/sh 2 3 failed_tests= 4 fixed=0 5 success=0 6 failed=0 7 broken=0 8 total=0 9 missing_prereq= 10 11 for file in "$1"/t*-*.counts 12 do 13 while read type value 14 do 15 case $type in 16 '') 17 continue ;; 18 fixed) 19 fixed=$(($fixed + $value)) ;; 20 success) 21 success=$(($success + $value)) ;; 22 failed) 23 failed=$(($failed + $value)) 24 if test $value != 0 25 then 26 testnum=$(expr "$file" : 'test-results/\(t[0-9]*\)-') 27 failed_tests="$failed_tests $testnum" 28 fi 29 ;; 30 broken) 31 broken=$(($broken + $value)) ;; 32 total) 33 total=$(($total + $value)) ;; 34 missing_prereq) 35 missing_prereq="$missing_prereq,$value" ;; 36 esac 37 done <"$file" 38 done 39 40 if test -n "$missing_prereq" 41 then 42 unique_missing_prereq=$( 43 echo $missing_prereq | 44 tr -s "," "\n" | 45 grep -v '^$' | 46 sort -u | 47 paste -s -d ' ' -) 48 if test -n "$unique_missing_prereq" 49 then 50 printf "\nmissing prereq: $unique_missing_prereq\n\n" 51 fi 52 fi 53 54 if test -n "$failed_tests" 55 then 56 printf "\nfailed test(s):$failed_tests\n\n" 57 fi 58 59 printf "%-8s%d\n" fixed $fixed 60 printf "%-8s%d\n" success $success 61 printf "%-8s%d\n" failed $failed 62 printf "%-8s%d\n" broken $broken 63 printf "%-8s%d\n" total $total