travis-ci add tests coverage to coveralls

This commit is contained in:
Daniel Agar 2017-04-23 18:10:17 -04:00
parent a3078c63ab
commit 6a249c742b
2 changed files with 14 additions and 2 deletions

View File

@ -18,7 +18,12 @@ matrix:
sudo: required
services:
- docker
env: BUILD_TARGET=tests_linux
env: BUILD_TARGET=tests
- os: linux
sudo: required
services:
- docker
env: BUILD_TARGET=tests_coverage
- os: linux
sudo: required
services:
@ -55,8 +60,10 @@ script:
echo "no script for coverity build";
elif [[ "${BUILD_TARGET}" = "check_format" ]]; then
./Tools/docker_run.sh 'make check_format';
elif [[ "${BUILD_TARGET}" = "tests_linux" ]]; then
elif [[ "${BUILD_TARGET}" = "tests" ]]; then
./Tools/docker_run.sh 'make tests';
elif [[ "${BUILD_TARGET}" = "tests_coverage" ]]; then
./Tools/docker_run.sh 'make tests_coverage';
elif [[ "${BUILD_TARGET}" = "px4_metadata" ]]; then
./Tools/docker_run.sh 'make px4_metadata';
elif [[ "${BUILD_TARGET}" = "clang-tidy" ]]; then
@ -74,6 +81,10 @@ after_success:
- if [[ "${BUILD_TARGET}" = "scan-build" && "${TRAVIS_PULL_REQUEST}" == "false" && "${TRAVIS_BRANCH}" == "master" ]]; then
PX4_DOCKER_REPO=px4io/px4-dev-clang:2017-04-22 ./Tools/docker_run.sh 'make s3put_scan-build AWS_S3_BUCKET="px4-travis/scan-build"';
fi
# coveralls code coverage report
- if [[ "${BUILD_TARGET}" = "tests_coverage" && "${TRAVIS_PULL_REQUEST}" == "false" ]]; then
./Tools/docker_run.sh 'cpp-coveralls -l coverage.info';
fi
addons:
coverity_scan:

View File

@ -46,6 +46,7 @@ docker run -it --rm -w "${SRC_DIR}" \
-e BRANCH_NAME="${BRANCH_NAME}" \
-e CCACHE_DIR="${CCACHE_DIR}" \
-e CI="${CI}" \
-e COVERALLS_REPO_TOKEN="${COVERALLS_REPO_TOKEN}" \
-e DISPLAY="${DISPLAY}" \
-e GIT_SUBMODULES_ARE_EVIL=1 \
-e LOCAL_USER_ID="$(id -u)" \