@@ -40,52 +40,52 @@ addons:
4040
4141install :
4242 - |
43- if [ "$BUILD_UNIT_TESTS" ]; then
44- # GCov 4.6 cannot handle the file structure
45- export CXX="g++-4.8"
46- export GCOV="gcov-4.8"
43+ if [ "${ BUILD_UNIT_TESTS} " ]; then
44+ # GCov 4.6 cannot handle the file structure
45+ export CXX="g++-4.8"
46+ export GCOV="gcov-4.8"
4747
48- # Install newer lcov (1.9 seems to fail: http://gronlier.fr/blog/2015/01/adding-code-coverage-to-your-c-project/)
49- export LCOV_ROOT="$HOME/lcov"
50- mkdir -p "$LCOV_ROOT"
51- wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.12.orig.tar.gz --output-document="$LCOV_ROOT/lcov.tar.gz"
52- tar xf "$LCOV_ROOT/lcov.tar.gz" --strip-components=1 -C $LCOV_ROOT
53- export PATH="$LCOV_ROOT/bin:$PATH"
54- which lcov
48+ # Install newer lcov (1.9 seems to fail: http://gronlier.fr/blog/2015/01/adding-code-coverage-to-your-c-project/)
49+ export LCOV_ROOT="$HOME/lcov"
50+ mkdir -p "$LCOV_ROOT"
51+ wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.12.orig.tar.gz --output-document="$LCOV_ROOT/lcov.tar.gz"
52+ tar xf "$LCOV_ROOT/lcov.tar.gz" --strip-components=1 -C $LCOV_ROOT
53+ export PATH="$LCOV_ROOT/bin:$PATH"
54+ which lcov
5555
56- # Install coveralls tool
57- gem install coveralls-lcov
58- export GENERATE_COVERAGE=1
59- else
60- # Install PlatformIO
61- pip install -U platformio
62- fi
56+ # Install coveralls tool
57+ gem install coveralls-lcov
58+ export GENERATE_COVERAGE=1
59+ else
60+ # Install PlatformIO
61+ pip install -U platformio
62+ fi
6363
6464script :
6565 # Build unit tests & generate code coverage
6666 - |
67- if [ "${BUILD_UNIT_TESTS}" ]; then
68- mkdir build && cd build
69- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILDER_ENABLE_PROFILING=${GENERATE_COVERAGE} --generator="Unix Makefiles" ..
70- make all
71- ctest --verbose
72- fi
67+ if [ "${BUILD_UNIT_TESTS}" ]; then
68+ mkdir build && cd build
69+ cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILDER_ENABLE_PROFILING=${GENERATE_COVERAGE} --generator="Unix Makefiles" ..
70+ make all
71+ ctest --verbose
72+ fi
7373
7474 # Build current example
7575 - |
76- if [ ! "${BUILD_UNIT_TESTS}" ]; then
77- platformio ci --lib="." --board=uno --board="due" --board="zero" --board="leonardo"
78- fi
76+ if [ ! "${BUILD_UNIT_TESTS}" ]; then
77+ platformio ci --lib="." --board=uno --board="due" --board="zero" --board="leonardo"
78+ fi
7979
8080after_success :
8181 - |
82- if [ "${GENERATE_COVERAGE}" ]; then
83- # Generate code coverage information & send to Coveralls
84- lcov --gcov-tool $GCOV --directory . --capture --output-file coverage.info
85- lcov --gcov-tool $GCOV --remove coverage.info 'test/*' '/usr/*' 'external/*' --output-file coverage.info
86- lcov --list coverage.info
87- coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info
88- fi
82+ if [ "${GENERATE_COVERAGE}" ]; then
83+ # Generate code coverage information & send to Coveralls
84+ lcov --gcov-tool $GCOV --directory . --capture --output-file coverage.info
85+ lcov --gcov-tool $GCOV --remove coverage.info 'test/*' '/usr/*' 'external/*' --output-file coverage.info
86+ lcov --list coverage.info
87+ coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info
88+ fi
8989
9090notifications :
9191 email : false
0 commit comments