]> git.gag.com Git - fw/altos/blob - src/test/run-tests
altosdroid: rework ConnectThread
[fw/altos] / src / test / run-tests
1 #!/bin/bash
2
3 DIR=~/misc/rockets/flights
4
5 expect_baro=2
6 expect_full=5
7
8 bad_baro=0
9 bad_full=0
10 while read flight description; do
11     if ./ao_flight_test_baro -s -i "$description" $DIR/$flight; then
12         :
13     else
14         : $((bad_baro++))
15     fi
16     if ./ao_flight_test -s -i "$description" $DIR/$flight; then
17         :
18     else
19         : $((bad_full++))
20     fi
21 done < test-flights
22 echo baro errors $bad_baro expected $expect_baro
23 echo full errors $bad_full expected $expect_full
24 : $((miss_baro = bad_baro > expect_baro ? bad_baro - expect_baro : expect_baro - bad_baro))
25 : $((miss_full = bad_full > expect_full ? bad_full - expect_full : expect_full - bad_full))
26 : $((miss = miss_baro + miss_full))
27 exit $miss