]> rtime.felk.cvut.cz Git - hercules2020/kcf.git/blob - print-test-results
Makefile: Use absolute path when invoking ninja
[hercules2020/kcf.git] / print-test-results
1 #!/bin/bash
2 set -e
3
4 declare -A expected_accuracy
5
6 expected_accuracy=([bag]=0.53 [ball1-correct]=0.65 [ball1]=0.27 [car1]=0.35 [book]=0.19
7                    [bmx]=0.38 [crossing]=0.48 [racing]=0.52)
8
9 for i in "$@"; do
10     [[ "$i" =~ build-(.*)/kcf_vot-(.*)-(.*).log ]]
11     build=${BASH_REMATCH[1]}
12     flags=${BASH_REMATCH[3]}
13     seq=${BASH_REMATCH[2]}
14
15     result=$(grep 'Average accuracy:' $i | sed -e 's/Average/Avg./g' -e 's/processing //' || :)
16     if [[ "$result" =~ accuracy:\ ([0-9.]+) ]]; then
17         result+=" >= ${expected_accuracy[$seq]}"
18         if [[ $(echo "${BASH_REMATCH[1]} >= ${expected_accuracy[$seq]:-0}"|bc) -eq 1 ]]; then
19             status=ok
20         else
21             status=ACCURACY
22         fi
23     else
24         status=FAILED
25     fi
26     echo ! "$seq;$flags;$build;$result;$status"
27 done | sort -t";" $SORT_FLAGS | column -t -s";"