have git ignore ao-bringup/cal_values
[fw/altos] / ao-bringup / test-telegps
1 #!/bin/sh
2
3 VERSION=1.0
4 PRODUCT=TeleGPS
5 BASE=`echo $PRODUCT | tr 'A-Z' 'a-z'`
6
7 echo "$PRODUCT-v$VERSION Test Program"
8 echo "Copyright 2014 by Bdale Garbee.  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
21             FLASHSIZE=2097152
22
23             echo "Testing flash"
24             ../ao-tools/ao-test-flash/ao-test-flash --tty="$dev" "$FLASHSIZE"
25
26             case $? in
27                 0)
28                     ;;
29                 *)
30                     echo "failed"
31                     exit 1
32             esac
33
34             echo "Testing GPS"
35             ../ao-tools/ao-test-gps/ao-test-gps --tty="$dev"
36
37             case $? in
38                 0)
39                     ;;
40                 *)
41                     echo "failed"
42                     exit 1
43             esac
44
45             echo "$PRODUCT-v$VERSION" serial "$serial" passed functional tests
46             ret=0
47             ;;
48         *)
49             echo "Skipping $product $serial $dev"
50             ;;
51     esac
52 done