aboutsummaryrefslogtreecommitdiff
path: root/ROMFS/px4fmu_test/init.d
diff options
context:
space:
mode:
authorDon Gagne <don@thegagnes.com>2014-09-13 19:59:44 -0700
committerDon Gagne <don@thegagnes.com>2014-09-13 19:59:44 -0700
commitdeda5d0a04300f2ee67194c4fc9a60da37de722a (patch)
tree038083acc52ef4198a46065ff123184044e5e183 /ROMFS/px4fmu_test/init.d
parent21367222379d6ae3b1c5c774942ac2aac5ca32cb (diff)
downloadpx4-firmware-deda5d0a04300f2ee67194c4fc9a60da37de722a.tar.gz
px4-firmware-deda5d0a04300f2ee67194c4fc9a60da37de722a.tar.bz2
px4-firmware-deda5d0a04300f2ee67194c4fc9a60da37de722a.zip
Upgraded unit test framework
Diffstat (limited to 'ROMFS/px4fmu_test/init.d')
-rw-r--r--ROMFS/px4fmu_test/init.d/rcS30
1 files changed, 30 insertions, 0 deletions
diff --git a/ROMFS/px4fmu_test/init.d/rcS b/ROMFS/px4fmu_test/init.d/rcS
index 56482d140..bc248ac04 100644
--- a/ROMFS/px4fmu_test/init.d/rcS
+++ b/ROMFS/px4fmu_test/init.d/rcS
@@ -75,3 +75,33 @@ if [ -f /fs/microsd/mount_test_cmds.txt ]
then
tests mount
fi
+
+#
+# Run unit tests at board boot, reporting failure as needed.
+# Add new unit tests using the same pattern as below.
+#
+
+set unit_test_failure 0
+
+if mavlink_tests
+then
+else
+ set unit_test_failure 1
+ set unit_test_failure_list "${unit_test_failure_list} mavlink_tests"
+fi
+
+if commander_tests
+then
+else
+ set unit_test_failure 1
+ set unit_test_failure_list "${unit_test_failure_list} commander_tests"
+fi
+
+if [ $unit_test_failure == 0 ]
+then
+ echo
+ echo "All Unit Tests PASSED"
+else
+ echo
+ echo "Some Unit Tests FAILED:${unit_test_failure_list}"
+fi \ No newline at end of file