summaryrefslogtreecommitdiff
path: root/src/test/run-tests
blob: 4edecf1ad40f51c32c41e2f57967de17a7860843 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash

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 -i "$description" $DIR/$flight; then
	:
    else
	: $((bad_baro++))
    fi
    if ./ao_flight_test -s -i "$description" $DIR/$flight; then
	:
    else
	: $((bad_full++))
    fi
done < test-flights
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