mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 19:07:45 +08:00
Modified sanity test to identify success from the output of the PX4 flight stack, instead of QuRT.
This commit is contained in:
Regular → Executable
+14
-3
@@ -49,8 +49,7 @@ declare -a appsproc_strings_absent=(
|
|||||||
|
|
||||||
# List of expected strings from the DSP
|
# List of expected strings from the DSP
|
||||||
declare -a dsp_strings_present=(
|
declare -a dsp_strings_present=(
|
||||||
"AdspCoreSvc: Started successfully"
|
"EKF aligned"
|
||||||
"loading BLSP configuration"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# List of unexpected strings from the DSP
|
# List of unexpected strings from the DSP
|
||||||
@@ -102,6 +101,10 @@ verifypx4test() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo -e "Displaying the content of the minidm.log"
|
||||||
|
cat minidm.log
|
||||||
|
echo -e "Analyzing the log for success and failure indications."
|
||||||
|
|
||||||
# verify the presence of expected stings in the DSP console log
|
# verify the presence of expected stings in the DSP console log
|
||||||
for lineString in "${dsp_strings_present[@]}"
|
for lineString in "${dsp_strings_present[@]}"
|
||||||
do
|
do
|
||||||
@@ -143,12 +146,16 @@ installpx4() {
|
|||||||
# Reboot the target before beginning the installation
|
# Reboot the target before beginning the installation
|
||||||
echo -e "Rebooting the target..."
|
echo -e "Rebooting the target..."
|
||||||
adb reboot
|
adb reboot
|
||||||
sleep 45
|
adb wait-for-devices
|
||||||
|
# Wait a bit longer after bootup, before copying binaries to the target.
|
||||||
|
sleep 30
|
||||||
|
adb devices
|
||||||
|
|
||||||
echo -e "Now installing PX4 binaries..."
|
echo -e "Now installing PX4 binaries..."
|
||||||
# Copy binaries to the target
|
# Copy binaries to the target
|
||||||
if [ $mode == 0 ]; then
|
if [ $mode == 0 ]; then
|
||||||
# copy default binaries
|
# copy default binaries
|
||||||
|
echo -e "Copying the PX4 binaries from the eagle_default build tree..."
|
||||||
adb push $workspace/build_qurt_eagle_default/src/firmware/qurt/libpx4.so /usr/share/data/adsp
|
adb push $workspace/build_qurt_eagle_default/src/firmware/qurt/libpx4.so /usr/share/data/adsp
|
||||||
adb push $workspace/build_qurt_eagle_default/src/firmware/qurt/libpx4muorb_skel.so /usr/share/data/adsp
|
adb push $workspace/build_qurt_eagle_default/src/firmware/qurt/libpx4muorb_skel.so /usr/share/data/adsp
|
||||||
adb push $workspace/build_posix_eagle_default/src/firmware/posix/px4 /home/linaro
|
adb push $workspace/build_posix_eagle_default/src/firmware/posix/px4 /home/linaro
|
||||||
@@ -156,12 +163,14 @@ installpx4() {
|
|||||||
adb push $workspace/posix-configs/eagle/flight/mainapp.config /home/linaro
|
adb push $workspace/posix-configs/eagle/flight/mainapp.config /home/linaro
|
||||||
elif [ $mode == 1 ]; then
|
elif [ $mode == 1 ]; then
|
||||||
# copy legacy binaries
|
# copy legacy binaries
|
||||||
|
echo -e "Copying the PX4 binaries from the eagle_legacy build tree..."
|
||||||
adb push $workspace/build_qurt_eagle_legacy/src/firmware/qurt/libpx4.so /usr/share/data/adsp
|
adb push $workspace/build_qurt_eagle_legacy/src/firmware/qurt/libpx4.so /usr/share/data/adsp
|
||||||
adb push $workspace/build_qurt_eagle_legacy/src/firmware/qurt/libpx4muorb_skel.so /usr/share/data/adsp
|
adb push $workspace/build_qurt_eagle_legacy/src/firmware/qurt/libpx4muorb_skel.so /usr/share/data/adsp
|
||||||
adb push $workspace/build_posix_eagle_legacy/src/firmware/posix/px4 /home/linaro
|
adb push $workspace/build_posix_eagle_legacy/src/firmware/posix/px4 /home/linaro
|
||||||
adb push $workspace/posix-configs/eagle/200qx/px4.config /usr/share/data/adsp
|
adb push $workspace/posix-configs/eagle/200qx/px4.config /usr/share/data/adsp
|
||||||
adb push $workspace/posix-configs/eagle/200qx/mainapp.config /home/linaro
|
adb push $workspace/posix-configs/eagle/200qx/mainapp.config /home/linaro
|
||||||
else
|
else
|
||||||
|
echo -e "Copying the PX4 binaries from the excelsior_legacy build tree..."
|
||||||
adb push $workspace/build_qurt_excelsior_legacy/src/firmware/qurt/libpx4.so /usr/lib/rfsa/adsp
|
adb push $workspace/build_qurt_excelsior_legacy/src/firmware/qurt/libpx4.so /usr/lib/rfsa/adsp
|
||||||
adb push $workspace/build_qurt_excelsior_legacy/src/firmware/qurt/libpx4muorb_skel.so /usr/lib/rfsa/adsp
|
adb push $workspace/build_qurt_excelsior_legacy/src/firmware/qurt/libpx4muorb_skel.so /usr/lib/rfsa/adsp
|
||||||
adb push $workspace/build_posix_excelsior_legacy/src/firmware/posix/px4 /home/root
|
adb push $workspace/build_posix_excelsior_legacy/src/firmware/posix/px4 /home/root
|
||||||
@@ -187,6 +196,7 @@ testpx4() {
|
|||||||
rm minidm.log | true
|
rm minidm.log | true
|
||||||
|
|
||||||
# Start mini-dm
|
# Start mini-dm
|
||||||
|
echo -e "Starting mini-dm..."
|
||||||
${minidmPath}/mini-dm > minidm.log &
|
${minidmPath}/mini-dm > minidm.log &
|
||||||
sleep 5
|
sleep 5
|
||||||
# Verify that mini-dm is running
|
# Verify that mini-dm is running
|
||||||
@@ -199,6 +209,7 @@ testpx4() {
|
|||||||
|
|
||||||
|
|
||||||
# Start PX4
|
# Start PX4
|
||||||
|
echo -e "Starting PX4..."
|
||||||
if [ $mode == 2 ]; then
|
if [ $mode == 2 ]; then
|
||||||
# 8x96 platform
|
# 8x96 platform
|
||||||
adb shell "/home/root/px4 /home/root/mainapp.config" > px4.log 2>&1 &
|
adb shell "/home/root/px4 /home/root/mainapp.config" > px4.log 2>&1 &
|
||||||
|
|||||||
Reference in New Issue
Block a user