ao-bringup: Improve igniter testing. Add TeleMega and TeleMetrum testing.
[fw/altos] / ao-bringup / test-easymini
1 #!/bin/sh
2
3 VERSION=1.0
4 PRODUCT=EasyMini
5 BASE=`echo $PRODUCT | tr 'A-Z' 'a-z'`
6
7 echo "$PRODUCT-v$VERSION Test Program"
8 echo "Copyright 2014 by Keith Packard.  Released under GPL v2"
9 echo
10 echo "Expectations:"
11 echo "\t$PRODUCT v$VERSION powered from USB"
12 echo
13
14 ret=1
15 ao-list | while read product serial dev; do
16     case "$product" in
17         "$PRODUCT-v$VERSION")
18
19             echo "Testing $product $serial $dev"
20             echo ""
21             
22             ./test-igniters "$dev" drogue main
23             echo ""
24
25             echo "Testing baro sensor"
26             ../ao-tools/ao-test-baro/ao-test-baro --tty="$dev"
27
28             case $? in
29                 0)
30                     ;;
31                 *)
32                     echo "failed"
33                     exit 1
34             esac
35             echo""
36
37             FLASHSIZE=1048576
38
39             echo "Testing flash"
40             ../ao-tools/ao-test-flash/ao-test-flash --tty="$dev" "$FLASHSIZE"
41
42             case $? in
43                 0)
44                     ;;
45                 *)
46                     echo "failed"
47                     exit 1
48             esac
49             echo""
50
51             echo "$PRODUCT-v$VERSION" serial "$serial" is ready to ship
52             ret=0
53             ;;
54     esac
55 done