Merge pull request #3161 from AndersHoglund/conditional_coverage

Coverage only created and published if PUBLISHCOV is defined.
This commit is contained in:
Anders Höglund 2017-05-27 20:25:07 +02:00 committed by GitHub
commit 63aa212efa
1 changed files with 2 additions and 1 deletions

View File

@ -68,13 +68,14 @@ elif [ $TARGET ] ; then
elif [ $GOAL ] ; then
$MAKE $GOAL || exit $?
if [ $PUBLISHCOV ] ; then
if [ "test" == "$GOAL" ] ; then
lcov --directory . -b src/test --capture --output-file coverage.info 2>&1 | grep -E ":version '402\*', prefer.*'406\*" --invert-match
lcov --remove coverage.info 'lib/test/*' 'src/test/*' '/usr/*' --output-file coverage.info # filter out system and test code
lcov --list coverage.info # debug before upload
coveralls-lcov coverage.info # uploads to coveralls
fi
fi
else
$MAKE all
fi