X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Ftest%2Frun-tests;h=4edecf1ad40f51c32c41e2f57967de17a7860843;hb=bc3610d8cecbfed40c62d4dcb93fc9a4d2a7c9e3;hp=3e0cad3cfe6489d34bcba61247725feae13ba9c9;hpb=43a94380032300a2e33e1faa1efe93e858e0a2cf;p=fw%2Faltos diff --git a/src/test/run-tests b/src/test/run-tests index 3e0cad3c..4edecf1a 100755 --- a/src/test/run-tests +++ b/src/test/run-tests @@ -1,22 +1,27 @@ -#!/bin/sh +#!/bin/bash -DIR=~/src/cc1111/flights +DIR=~/misc/rockets/flights + +expect_baro=2 +expect_full=5 bad_baro=0 bad_full=0 while read flight description; do - if ./ao_flight_test_baro -s $DIR/$flight; then + if ./ao_flight_test_baro -s -i "$description" $DIR/$flight; then : else - ((bad_baro++)) + : $((bad_baro++)) fi - if ./ao_flight_test -s $DIR/$flight; then + if ./ao_flight_test -s -i "$description" $DIR/$flight; then : else - ((bad_full++)) + : $((bad_full++)) fi done < test-flights -echo baro errors $bad_baro -echo full errors $bad_full -((bad = bad_baro + bad_full)) -exit $bad \ No newline at end of file +echo baro errors $bad_baro expected $expect_baro +echo full errors $bad_full expected $expect_full +: $((miss_baro = bad_baro > expect_baro ? bad_baro - expect_baro : expect_baro - bad_baro)) +: $((miss_full = bad_full > expect_full ? bad_full - expect_full : expect_full - bad_full)) +: $((miss = miss_baro + miss_full)) +exit $miss \ No newline at end of file