From 5234ba49ad045f74489782466ac626f2765bbebb Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Sat, 5 May 2018 16:55:36 -0400 Subject: [PATCH] Jenkins code coverage build --- Jenkinsfile | 19 +++++++++++++++++++ Makefile | 5 ----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5ea801c018..5e91075dba 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -283,6 +283,25 @@ pipeline { } } + stage('tests (code coverage)') { + agent { + docker { + image 'px4io/px4-dev-ros:2018-03-30' + args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw' + } + } + steps { + sh 'export' + sh 'make distclean' + sh 'ulimit -c unlimited; make tests_coverage' + sh 'ls' + withCredentials([string(credentialsId: 'FIRMWARE_CODECOV_TOKEN', variable: 'CODECOV_TOKEN')]) { + sh 'curl -s https://codecov.io/bash | bash -s' + } + sh 'make distclean' + } + } + stage('check stack') { agent { docker { diff --git a/Makefile b/Makefile index 3cffdb0613..9804923431 100644 --- a/Makefile +++ b/Makefile @@ -288,11 +288,6 @@ tests: tests_coverage: @$(MAKE) clean - @$(MAKE) --no-print-directory posix_sitl_default PX4_CMAKE_BUILD_TYPE=Coverage - @$(MAKE) --no-print-directory posix_sitl_default sitl_gazebo PX4_CMAKE_BUILD_TYPE=Coverage - @$(SRC_DIR)/test/rostest_px4_run.sh mavros_posix_tests_missions.test - @$(SRC_DIR)/test/rostest_px4_run.sh mavros_posix_tests_offboard_attctl.test - @$(SRC_DIR)/test/rostest_px4_run.sh mavros_posix_tests_offboard_posctl.test @$(MAKE) --no-print-directory posix_sitl_default test_coverage_genhtml PX4_CMAKE_BUILD_TYPE=Coverage @echo "Open $(SRC_DIR)/build/posix_sitl_default/coverage-html/index.html to see coverage"