]> rtime.felk.cvut.cz Git - hercules2020/kcf.git/commitdiff
Refactor print-test-results
authorMichal Sojka <michal.sojka@cvut.cz>
Mon, 21 Jan 2019 12:56:11 +0000 (13:56 +0100)
committerMichal Sojka <michal.sojka@cvut.cz>
Mon, 21 Jan 2019 12:56:11 +0000 (13:56 +0100)
Some tests fail on Travis so we will introduce a special case for them.
It will be easier after this commit.

print-test-results

index b3062404fe97ae58da34b40c38ee6ee3aca491a2..fa4b04ce7c5bcb16e405f9fc19ec12dee126a604 100755 (executable)
@@ -13,9 +13,10 @@ for i in "$@"; do
     seq=${BASH_REMATCH[2]}
 
     result=$(grep 'Average accuracy:' $i | sed -e 's/Average/Avg./g' -e 's/processing //' || :)
+    expected="${expected_accuracy[$seq]:-0}"
     if [[ "$result" =~ accuracy:\ ([0-9.]+) ]]; then
-       result+=" >= ${expected_accuracy[$seq]}"
-       if [[ $(echo "${BASH_REMATCH[1]} >= ${expected_accuracy[$seq]:-0}"|bc) -eq 1 ]]; then
+       result+=" >= $expected"
+       if [[ $(echo "${BASH_REMATCH[1]} >= ${expected}"|bc) -eq 1 ]]; then
            status=ok
        else
            status=ACCURACY