Permalink
Browse files

circleci run tests under code coverage (#6273)

 * use regular optimization levels for the code coverage build.
 * the mixer test fails intermittently when built without optimization
  • Loading branch information...
1 parent 768485c commit dc787830b53f17b9d80291eeeed2a5577d1fbfad @dagar dagar committed on GitHub Jan 9, 2017
Showing with 6 additions and 13 deletions.
  1. +0 −7 Makefile
  2. +1 −1 Tools/docker_run.sh
  3. +4 −4 circle.yml
  4. +1 −1 cmake/common/px4_base.cmake
View
@@ -95,13 +95,6 @@ endif
SRC_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
-# optionally run commmands in PX4 docker
-ifdef PX4_DOCKER
- PX4_RUN = docker run -it --rm -v $(SRC_DIR):$(SRC_DIR):rw -w $(SRC_DIR) -v /tmp/.X11-unix:/tmp/.X11-unix:ro -v $(HOME)/.ccache:$(HOME)/.ccache:rw -e CCACHE_DIR=$(HOME)/.ccache -e LOCAL_USER_ID=`id -u $(USER)` px4io/px4-dev-nuttx:2017-01-01 /bin/bash -c "$1"
-else
- PX4_RUN = $1
-endif
-
# check if replay env variable is set & set build dir accordingly
ifdef replay
BUILD_DIR_SUFFIX := _replay
View
@@ -12,4 +12,4 @@ docker run -it --rm -w ${SRC_DIR} \
-v ${CCACHE_DIR}:${CCACHE_DIR}:rw \
-e CCACHE_DIR=${CCACHE_DIR} \
-e LOCAL_USER_ID=`id -u` \
- px4io/px4-dev-nuttx:2017-01-07 /bin/bash -c "$@"
+ px4io/px4-dev-nuttx:2017-01-08 /bin/bash -c "$@"
View
@@ -17,9 +17,9 @@ dependencies:
test:
override:
- - ./Tools/docker_run.sh 'make tests'
+ - ./Tools/docker_run.sh 'make tests_coverage'
# copy test results for circleci
- #- mkdir -p $CIRCLE_TEST_REPORTS/junit/ && cp ./build_posix_sitl_default/JUnitTestResults.xml build_unittest/test_detail.xml $CIRCLE_TEST_REPORTS/junit/
- #- mkdir -p $CIRCLE_ARTIFACTS && cp -R coverage-html $CIRCLE_ARTIFACTS
+ - mkdir -p $CIRCLE_TEST_REPORTS/junit/ && cp ./build_posix_sitl_default/JUnitTestResults.xml build_unittest/test_detail.xml $CIRCLE_TEST_REPORTS/junit/
+ - mkdir -p $CIRCLE_ARTIFACTS && cp -R coverage-html $CIRCLE_ARTIFACTS
# only post to coveralls if not a fork PR
- #- if [ -z ${CIRCLE_PR_USERNAME}]; then ./Tools/docker_run.sh 'cpp-coveralls -l coverage.info'; fi
+ - if [ -z ${CIRCLE_PR_USERNAME}]; then cpp-coveralls -l coverage.info; fi
@@ -796,7 +796,7 @@ function(px4_add_common_flags)
# code coverage
if ($ENV{PX4_CODE_COVERAGE} MATCHES "1")
- set(max_optimization -O0)
+ #set(max_optimization -O0)
endif()
set(c_warnings

0 comments on commit dc78783

Please sign in to comment.