Skip to content

Commit

Permalink
add test scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
PonomarevDA committed Sep 21, 2023
1 parent b70625e commit a800168
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions scripts/test_scenario.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
REPOSITORY_DIR="$(dirname "$SCRIPT_DIR")"
MISSIONS_DIR=$REPOSITORY_DIR/missions

autopilot_tools_version=$(pip show autopilot_tools | grep Version)
if [ ! -z "$autopilot_tools_version" ]; then
IFS=':' read -ra version <<< "$autopilot_tools_version"
IFS='.' read -ra version <<< ${version[1]}
echo -n "autopilot-tools: $autopilot_tools_version"
if (( ${version[1]} >= 4 )); then
echo ""
else
echo " (Consider updating)"
fi
else
echo "Error: autopilot-tools is not installed."
exit
fi

mission=$MISSIONS_DIR/square_2_minutes.plan
log=$REPOSITORY_DIR/latest_log.ulg

rm -f $log
test-scenario $mission --device serial --timeout 500 --output $log --verbose

0 comments on commit a800168

Please sign in to comment.