From 119cf6bb13042d1c7f4bd6cf155aa9ca5c0f41d2 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 22 Feb 2016 07:50:13 +1100 Subject: [PATCH] ci: added sitltest target this adds some basic SITL testing to our CI --- .travis.yml | 1 + Tools/scripts/build_ci.sh | 14 ++++++++++++++ Tools/scripts/configure-ci.sh | 3 ++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 928b867bc9..ce0eb1d89d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,3 +38,4 @@ env: matrix: - CI_BUILD_TARGET="px4-v2 sitl linux" - CI_BUILD_TARGET="navio raspilot minlure bebop" + - CI_BUILD_TARGET="sitltest" diff --git a/Tools/scripts/build_ci.sh b/Tools/scripts/build_ci.sh index e054ebd6f3..a5b8f46b30 100755 --- a/Tools/scripts/build_ci.sh +++ b/Tools/scripts/build_ci.sh @@ -40,6 +40,20 @@ build_concurrency=(["navio"]="-j2" build_extra_clean=(["px4-v2"]="make px4-cleandep") +# special case for SITL testing in CI +if [ "$CI_BUILD_TARGET" = "sitltest" ]; 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 QuadCopter test" + Tools/autotest/autotest.py -j2 build.ArduCopter fly.ArduCopter + echo "Running SITL QuadPlane test" + Tools/autotest/autotest.py -j2 build.ArduPlane fly.QuadPlane + exit 0 +fi + waf=modules/waf/waf-light # get list of boards supported by the waf build diff --git a/Tools/scripts/configure-ci.sh b/Tools/scripts/configure-ci.sh index b4d3116feb..1b34d93ee6 100755 --- a/Tools/scripts/configure-ci.sh +++ b/Tools/scripts/configure-ci.sh @@ -4,7 +4,7 @@ set -ex PKGS="build-essential gawk ccache genromfs libc6-i386 \ - python-argparse python-empy python-serial zlib1g-dev gcc-4.9 g++-4.9" + python-argparse python-empy python-serial python-pexpect python-dev python-pip zlib1g-dev gcc-4.9 g++-4.9" ARM_ROOT="gcc-arm-none-eabi-4_9-2015q3" ARM_TARBALL="$ARM_ROOT-20150921-linux.tar.bz2" @@ -15,6 +15,7 @@ RPI_TARBALL="$RPI_ROOT.tar.gz" sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y sudo apt-get -qq -y update sudo apt-get -qq -y install $PKGS +sudo pip install mavproxy sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 90 \ --slave /usr/bin/g++ g++ /usr/bin/g++-4.9