Added a self test feature to the VOXL 2 muorb module (#20307)

* Removed exit after dsp signature generation.
* First full test suite
* Cleaned up the muorb tests
* Improved VOXL 2 self test trigger in startup file
* Removed unneeded include file
This commit is contained in:
Eric Katzfey
2022-09-26 16:25:24 -04:00
committed by GitHub
parent 7bc79b491f
commit a5bfc3fbc2
11 changed files with 309 additions and 22 deletions
+6 -4
View File
@@ -13,24 +13,26 @@ else
/share/modalai/qrb5165-slpi-test-sig/generate-test-sig.sh
else
/bin/echo "Could not find the DSP signature file generation script"
exit 0
fi
exit 0
fi
# Make sure to setup all of the needed px4 aliases.
cd /usr/bin
/bin/ln -f -s px4 px4-muorb
/bin/ln -f -s px4 px4-uorb
cd -
DAEMON=" "
S="OFF"
while getopts "d" flag
while getopts "ds" flag
do
case "${flag}" in
# Use -d to put PX4 into daemon mode
d) DAEMON="-d";;
# Use -s to run self tests
s) S="ON";;
esac
done
px4 $DAEMON -s /etc/modalai/voxl-px4.config
TESTMODE=$S px4 $DAEMON -s /etc/modalai/voxl-px4.config
+13
View File
@@ -3,4 +3,17 @@
# (px4-alias.sh is expected to be in the PATH)
. px4-alias.sh
if [ $TESTMODE = "ON" ]; then
/bin/echo "Running self tests"
muorb test
MUORB_TEST_STATUS=$?
if [ $MUORB_TEST_STATUS -ne 0 ]; then
/bin/echo "muorb test failed"
shutdown
exit 0
else
/bin/echo "muorb test passed"
fi
fi
muorb start