From 8d833e8f23cfac64b8cca6daa711232bcd7a8927 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 19 Jul 2022 22:22:05 +1000 Subject: [PATCH] Tools: add CI test to build with default build_options.py output hopefully make defaults builds on the build server work all the time --- Tools/scripts/build_ci.sh | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/Tools/scripts/build_ci.sh b/Tools/scripts/build_ci.sh index 75f6456180..4a5e2ece28 100755 --- a/Tools/scripts/build_ci.sh +++ b/Tools/scripts/build_ci.sh @@ -32,6 +32,15 @@ echo "Compiler: $c_compiler" pymavlink_installed=0 mavproxy_installed=0 +function install_pymavlink() { + if [ $pymavlink_installed -eq 0 ]; then + echo "Installing pymavlink" + git submodule update --init --recursive + (cd modules/mavlink/pymavlink && python setup.py build install --user) + pymavlink_installed=1 + fi +} + function run_autotest() { NAME="$1" BVEHICLE="$2" @@ -52,12 +61,7 @@ function run_autotest() { # now uninstall the version of pymavlink pulled in by MAVProxy deps: python -m pip uninstall -y pymavlink fi - if [ $pymavlink_installed -eq 0 ]; then - echo "Installing pymavlink" - git submodule update --init --recursive - (cd modules/mavlink/pymavlink && python setup.py build install --user) - pymavlink_installed=1 - fi + install_pymavlink unset BUILDROOT echo "Running SITL $NAME test" @@ -334,6 +338,19 @@ for t in $CI_BUILD_TARGET; do continue fi + if [ "$t" == "build-options-defaults-test" ]; then + install_pymavlink + echo "Checking default options in build_options.py work" + time ./Tools/autotest/test_build_options.py \ + --no-disable-all \ + --no-disable-none \ + --no-disable-in-turn \ + --board=CubeOrange \ + --build-targets=copter \ + --build-targets=plane + continue + fi + if [[ -z ${CI_CRON_JOB+1} ]]; then echo "Starting waf build for board ${t}..." $waf configure --board "$t" \