ao-bringup: Improve igniter testing. Add TeleMega and TeleMetrum testing.
authorKeith Packard <keithp@keithp.com>
Sat, 13 Sep 2014 03:58:26 +0000 (20:58 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 13 Sep 2014 03:58:26 +0000 (20:58 -0700)
The script lets you re-try each one when they fail, which is nice if
you're hand-holding the setup.

The TeleMetrum and TeleMega tests are adapted from the EasyMega tests
and are hooked up to the turnon scripts.

Signed-off-by: Keith Packard <keithp@keithp.com>
ao-bringup/test-easymega
ao-bringup/test-easymini
ao-bringup/test-igniters [new file with mode: 0755]
ao-bringup/test-telemega [new file with mode: 0755]
ao-bringup/test-telemetrum [new file with mode: 0755]
ao-bringup/turnon_telemega
ao-bringup/turnon_telemetrum

index eabe1ee5f975aa6e2b29dc43997e385ef9296d9e..76f3effb63ae69e4a36dff927b3d1a8826162a14 100755 (executable)
@@ -17,22 +17,10 @@ ao-list | while read product serial dev; do
        "$PRODUCT-v$VERSION")
 
            echo "Testing $product $serial $dev"
+           echo ""
 
-           for igniter in drogue main 0 1 2 3; do
-               echo "Testing $igniter igniter."
-               echo -n "Press enter to continue..."
-               read foo < /dev/tty
-               ../ao-tools/ao-test-igniter/ao-test-igniter --tty="$dev" $igniter
-
-               case $? in
-                   0)
-                       ;;
-                   *)
-                       echo "failed"
-                       exit 1
-                       ;;
-               esac
-           done
+           ./test-igniters $dev drogue main 0 1 2 3
+           echo""
 
            echo "Testing baro sensor"
            ../ao-tools/ao-test-baro/ao-test-baro --tty="$dev"
@@ -44,6 +32,7 @@ ao-list | while read product serial dev; do
                    echo "failed"
                    exit 1
            esac
+           echo""
 
            FLASHSIZE=8388608
 
@@ -57,12 +46,10 @@ ao-list | while read product serial dev; do
                    echo "failed"
                    exit 1
            esac
+           echo""
 
            echo "$PRODUCT-v$VERSION" serial "$serial" is ready to ship
            ret=0
            ;;
-       *)
-           echo "Skipping $product $serial $dev"
-           ;;
     esac
 done
index 17e0095526e3270e735eaccfc28f3445e42ac8aa..e11244d2372eced9700fe10b5be103d574617c4d 100755 (executable)
@@ -17,17 +17,10 @@ ao-list | while read product serial dev; do
        "$PRODUCT-v$VERSION")
 
            echo "Testing $product $serial $dev"
-
-           echo "Testing igniters. Both should flash"
-           ../ao-tools/ao-test-igniter/ao-test-igniter --tty="$dev" drogue main
-
-           case $? in
-               0)
-                   ;;
-               *)
-                   echo "failed"
-                   exit 1
-           esac
+           echo ""
+           
+           ./test-igniters "$dev" drogue main
+           echo ""
 
            echo "Testing baro sensor"
            ../ao-tools/ao-test-baro/ao-test-baro --tty="$dev"
@@ -39,6 +32,7 @@ ao-list | while read product serial dev; do
                    echo "failed"
                    exit 1
            esac
+           echo""
 
            FLASHSIZE=1048576
 
@@ -52,12 +46,10 @@ ao-list | while read product serial dev; do
                    echo "failed"
                    exit 1
            esac
+           echo""
 
            echo "$PRODUCT-v$VERSION" serial "$serial" is ready to ship
            ret=0
            ;;
-       *)
-           echo "Skipping $product $serial $dev"
-           ;;
     esac
 done
diff --git a/ao-bringup/test-igniters b/ao-bringup/test-igniters
new file mode 100755 (executable)
index 0000000..763f42a
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+dev="$1"
+shift
+
+for igniter in "$@"; do
+       pass="n"
+       while [ $pass != "y" ]; do
+               echo -n "Testing $igniter igniter. Press enter to continue..."
+               read foo < /dev/tty
+               ../ao-tools/ao-test-igniter/ao-test-igniter --tty="$dev" $igniter
+
+               case $? in
+                   0)
+                       echo "pass"
+                       pass="y"
+                       ;;
+                   *)
+                       echo "Failed. Try again."
+                       ;;
+               esac
+       done
+done
+
+exit 0
diff --git a/ao-bringup/test-telemega b/ao-bringup/test-telemega
new file mode 100755 (executable)
index 0000000..d3c13e1
--- /dev/null
@@ -0,0 +1,66 @@
+#!/bin/sh
+
+VERSION=0.1
+PRODUCT=TeleMega
+BASE=`echo $PRODUCT | tr 'A-Z' 'a-z'`
+
+echo "$PRODUCT-v$VERSION Test Program"
+echo "Copyright 2014 by Keith Packard.  Released under GPL v2"
+echo
+echo "Expectations:"
+echo "\t$PRODUCT v$VERSION powered from USB"
+echo
+
+ret=1
+ao-list | while read product serial dev; do
+    case "$product" in
+       "$PRODUCT-v$VERSION")
+
+           echo "Testing $product $serial $dev"
+
+           ./test-igniters $dev drogue main 0 1 2 3
+           echo""
+
+           echo "Testing baro sensor"
+           ../ao-tools/ao-test-baro/ao-test-baro --tty="$dev"
+
+           case $? in
+               0)
+                   ;;
+               *)
+                   echo "failed"
+                   exit 1
+           esac
+           echo""
+
+           FLASHSIZE=8388608
+
+           echo "Testing flash"
+           ../ao-tools/ao-test-flash/ao-test-flash --tty="$dev" "$FLASHSIZE"
+
+           case $? in
+               0)
+                   ;;
+               *)
+                   echo "failed"
+                   exit 1
+           esac
+           echo""
+
+           echo "Testing GPS"
+           ../ao-tools/ao-test-gps/ao-test-gps --tty="$dev"
+
+           case $? in
+               0)
+                   ;;
+               *)
+                   echo "failed"
+                   exit 1
+           esac
+           echo""
+
+           echo "$PRODUCT-v$VERSION" serial "$serial" is ready to ship
+           ret=0
+           ;;
+    esac
+done
diff --git a/ao-bringup/test-telemetrum b/ao-bringup/test-telemetrum
new file mode 100755 (executable)
index 0000000..57a4d90
--- /dev/null
@@ -0,0 +1,67 @@
+#!/bin/sh
+
+VERSION=2.0
+PRODUCT=TeleMetrum
+BASE=`echo $PRODUCT | tr 'A-Z' 'a-z'`
+
+echo "$PRODUCT-v$VERSION Test Program"
+echo "Copyright 2014 by Keith Packard.  Released under GPL v2"
+echo
+echo "Expectations:"
+echo "\t$PRODUCT v$VERSION powered from USB"
+echo
+
+ret=1
+ao-list | while read product serial dev; do
+    case "$product" in
+       "$PRODUCT-v$VERSION")
+
+           echo "Testing $product $serial $dev"
+           echo ""
+
+           ./test-igniters "$dev" drogue main
+           echo ""
+
+           echo "Testing baro sensor"
+           ../ao-tools/ao-test-baro/ao-test-baro --tty="$dev"
+
+           case $? in
+               0)
+                   ;;
+               *)
+                   echo "failed"
+                   exit 1
+           esac
+           echo""
+
+           FLASHSIZE=8388608
+
+           echo "Testing flash"
+           ../ao-tools/ao-test-flash/ao-test-flash --tty="$dev" "$FLASHSIZE"
+
+           case $? in
+               0)
+                   ;;
+               *)
+                   echo "failed"
+                   exit 1
+           esac
+           echo""
+
+           echo "Testing GPS"
+           ../ao-tools/ao-test-gps/ao-test-gps --tty="$dev"
+
+           case $? in
+               0)
+                   ;;
+               *)
+                   echo "failed"
+                   exit 1
+           esac
+           echo""
+
+           echo "$PRODUCT-v$VERSION" serial "$serial" is ready to ship
+           ret=0
+           ;;
+    esac
+done
index 7745a8e560abcddf71bddf50fc8281c0db75965d..e0e0d4fe6171d90ab949e5e66f8fa21fc0e36ff4 100755 (executable)
@@ -57,3 +57,7 @@ SERIAL=$SERIAL ./cal-freq $dev
 ../ao-tools/ao-cal-accel/ao-cal-accel $dev
 
 echo 'E 1' > $dev
+
+./test-telemega
+
+exit $?
index 48ff1e276cb6083aeed292821b6e8469b186675f..ba40a08a363b763f38ef95555ebf48a3b8196a82 100755 (executable)
@@ -56,3 +56,7 @@ SERIAL=$SERIAL ./cal-freq $dev
 ../ao-tools/ao-cal-accel/ao-cal-accel $dev
 
 echo 'E 1' > $dev
+
+./test-telemetrum
+
+exit $?