Browse Source

Tools: Split sitl tests into per vehicle tasks

mission-4.1.18
Michael du Breuil 7 years ago committed by Randy Mackay
parent
commit
a7cdca030c
  1. 46
      Tools/scripts/build_ci.sh

46
Tools/scripts/build_ci.sh

@ -32,8 +32,21 @@ else @@ -32,8 +32,21 @@ else
export CCACHE_MAXSIZE="150M"
fi
declare -A waf_supported_boards
waf=modules/waf/waf-light
# get list of boards supported by the waf build
for board in $($waf list_boards | head -n1); do waf_supported_boards[$board]=1; done
function get_time {
date -u "+%s"
}
echo "Targets: $CI_BUILD_TARGET"
for t in $CI_BUILD_TARGET; do
# special case for SITL testing in CI
if [ "$CI_BUILD_TARGET" = "sitltest" ]; then
if [ $t == "sitltest-copter" ]; then
echo "Installing pymavlink"
git submodule init
git submodule update
@ -42,28 +55,31 @@ if [ "$CI_BUILD_TARGET" = "sitltest" ]; then @@ -42,28 +55,31 @@ if [ "$CI_BUILD_TARGET" = "sitltest" ]; then
echo "Running SITL QuadCopter test"
Tools/autotest/autotest.py build.ArduCopter fly.ArduCopter
ccache -s && ccache -z
continue
fi
if [ $t == "sitltest-quadplane" ]; then
echo "Installing pymavlink"
git submodule init
git submodule update
(cd modules/mavlink/pymavlink && python setup.py build install --user)
unset BUILDROOT
echo "Running SITL QuadPlane test"
Tools/autotest/autotest.py build.ArduPlane fly.QuadPlane
ccache -s && ccache -z
continue
fi
if [ $t == "sitltest-rover" ]; then
echo "Installing pymavlink"
git submodule init
git submodule update
(cd modules/mavlink/pymavlink && python setup.py build install --user)
unset BUILDROOT
echo "Running SITL Rover test"
Tools/autotest/autotest.py build.APMrover2 drive.APMrover2
ccache -s && ccache -z
exit 0
continue
fi
declare -A waf_supported_boards
waf=modules/waf/waf-light
# get list of boards supported by the waf build
for board in $($waf list_boards | head -n1); do waf_supported_boards[$board]=1; done
function get_time {
date -u "+%s"
}
echo "Targets: $CI_BUILD_TARGET"
for t in $CI_BUILD_TARGET; do
# only do make-based builds for GCC, when target is PX4-v3 or build is launched by a scheduled job and target is a PX4 board or SITL
if [[ "$cxx_compiler" != "clang++" && ($t == "px4-v3" || (-n ${CI_CRON_JOB+1} && ($t == "px4"* || $t == "sitl"))) ]]; then
echo "Starting make based build for target ${t}..."

Loading…
Cancel
Save