Coverage only for g++, reactivated examples.

This commit is contained in:
Francois Best 2016-10-09 21:47:16 +02:00
parent b21500e8e6
commit 80b46ec903
1 changed files with 14 additions and 9 deletions

View File

@ -10,8 +10,8 @@ os:
- linux - linux
compiler: compiler:
- clang
- g++ - g++
- clang
env: env:
- BUILD_TYPE=Debug - BUILD_TYPE=Debug
@ -28,10 +28,10 @@ addons:
- cmake - cmake
before_install: before_install:
# - source <(curl -SLs https://raw.githubusercontent.com/fortyseveneffects/travis-ci-arduino/master/install.sh) - source <(curl -SLs https://raw.githubusercontent.com/fortyseveneffects/travis-ci-arduino/master/install.sh)
install: install:
# Enable coverage analysis only for clang # Enable coverage analysis only for GCC
- | - |
if [ "$CXX" = "g++" ]; then if [ "$CXX" = "g++" ]; then
# GCov 4.6 cannot handle the file structure # GCov 4.6 cannot handle the file structure
@ -48,16 +48,18 @@ install:
# Install coveralls tool # Install coveralls tool
gem install coveralls-lcov gem install coveralls-lcov
export GENERATE_COVERAGE=1
else else
export GCOV="gcov" # Just to have anything valid export GCOV="gcov" # Just to have anything valid
export GENERATE_COVERAGE=0
fi fi
# Use clang 3.5 # Use clang 3.5
- if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.5"; export CC="clang-3.5"; fi - if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.5"; export CC="clang-3.5"; fi
script: script:
# Build examples with Arduino IDE on each available platform / board # Build examples with Arduino IDE on each available platform / board
# - build_main_platforms - build_main_platforms
# Build and run unit tests with regular C++ compiler # Build and run unit tests with regular C++ compiler
- mkdir build && cd build - mkdir build && cd build
@ -66,11 +68,14 @@ script:
- ctest --verbose - ctest --verbose
after_success: after_success:
# Generate code coverage information & send to Coveralls - |
- lcov --gcov-tool $GCOV --directory . --capture --output-file coverage.info if [ "${GENERATE_COVERAGE}" ]; then
- lcov --gcov-tool $GCOV --remove coverage.info 'test/*' '/usr/*' 'external/*' --output-file coverage.info # Generate code coverage information & send to Coveralls
- lcov --list coverage.info lcov --gcov-tool $GCOV --directory . --capture --output-file coverage.info
- coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info lcov --gcov-tool $GCOV --remove coverage.info 'test/*' '/usr/*' 'external/*' --output-file coverage.info
lcov --list coverage.info
coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info
fi
notifications: notifications:
email: false email: false