From b8b657a42c49d892c184d8a2745ae01bfe1e4d21 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Tue, 2 Oct 2018 15:40:48 +0200 Subject: [PATCH] Make test protocol more brief and allow different sorting --- Makefile | 2 +- print-test-results | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 2bf9367..5ca4058 100644 --- a/Makefile +++ b/Makefile @@ -117,7 +117,7 @@ rule TEST_SEQ command = build-$$build/kcf_vot $$flags $$seq $(if $(TRAVIS),2>&1) >$$out $(if $(TRAVIS),| grep -v libdc1394); true rule PRINT_RESULTS description = Print results - command = ./wvtool -w131 -v run ./print-test-results $$in + command = ./wvtool -w120 -v run ./print-test-results $$in rule PLOT_RESULTS description = Plot results command = ./graphGen.sh -f -s $$in diff --git a/print-test-results b/print-test-results index f58705d..4b9b195 100755 --- a/print-test-results +++ b/print-test-results @@ -12,8 +12,8 @@ for i in "$@"; do flags=${BASH_REMATCH[3]} seq=${BASH_REMATCH[2]} - result=$(grep 'Average accuracy:' $i || :) - if [[ "$result" =~ Average\ accuracy:\ ([0-9.]+) ]]; then + result=$(grep 'Average accuracy:' $i | sed -e 's/Average/Avg./g' -e 's/processing //' || :) + if [[ "$result" =~ accuracy:\ ([0-9.]+) ]]; then result+=" >= ${expected_accuracy[$seq]}" if [[ $(echo "${BASH_REMATCH[1]} >= ${expected_accuracy[$seq]:-0}"|bc) -eq 1 ]]; then status=ok @@ -24,4 +24,4 @@ for i in "$@"; do status=FAILED fi echo ! "$seq;$flags;$build;$result;$status" -done | sort | column -t -s";" +done | sort -t";" $SORT_FLAGS | column -t -s";" -- 2.39.2