diff options
author | Keith Packard <keithp@keithp.com> | 2011-03-18 20:36:59 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-03-18 20:36:59 -0700 |
commit | c985bb6a19c710409629f3c095332ba7afcf5248 (patch) | |
tree | 365df90506b37cb294bdd76d142752de404b8bab /src/test/run-tests | |
parent | dbe915795c66995805b5f37e6eb698cf2c143e61 (diff) |
altos/test: Add scripts to run lots of flights through the code
This runs a long list of flights (there's a user-specific path
pointing at the flights) and squawks if the baro and dual flight
computers don't match.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/test/run-tests')
-rwxr-xr-x | src/test/run-tests | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/run-tests b/src/test/run-tests new file mode 100755 index 00000000..ec279776 --- /dev/null +++ b/src/test/run-tests @@ -0,0 +1,22 @@ +#!/bin/sh + +DIR=~/src/cc1111/flights + +while read flight; do + baro=`./ao_flight_test_baro -s $DIR/$flight | + awk '/drogue/ { printf "%s ", $4 } + /main/ { printf "%s\n", $4 }'` + full=`./ao_flight_test -s $DIR/$flight | + awk '/drogue/ { printf "%s ", $4 } + /main/ { printf "%s\n", $4 }'` + echo $flight $baro $full +done < test-flights | +awk '{ name = $1; + drogue_error = $2 - $4; + if (drogue_error < 0) drogue_error = -drogue_error; + main_error = $3 - $5; + if (main_error < 0) main_error = -main_error; + if (drogue_error > 4 || main_error > 4) + printf ("%s: baro drogue %f main %f. full drogue %f main %f\n", + name, $2, $3, $4, $5); + }' |