diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2016-12-25 14:53:13 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2016-12-25 14:53:13 +0100 |
| commit | df07c7e88cd8a6983449acdafe9431a3540c9187 (patch) | |
| tree | e88e8d39d3f1e5d53e34d1123f3db96827eedfa2 | |
| parent | 8b90c5be81649b3aae8ca9ffed3282e8985c47da (diff) | |
| download | extfs-df07c7e88cd8a6983449acdafe9431a3540c9187.tar.xz extfs-df07c7e88cd8a6983449acdafe9431a3540c9187.zip | |
travis: Factor out coverage reporting
| -rw-r--r-- | .travis.yml | 3 | ||||
| -rwxr-xr-x | .travis/report-coverage.sh | 18 |
2 files changed, 19 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml index 4b57b71..5559acd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -94,5 +94,4 @@ script: - if [ "$BUILD_TYPE" == "Coverage" ]; then cmake --build . --target coverage; fi after_success: - - if [ "$BUILD_TYPE" == "Coverage" ]; then sed -i'' -e "s_$(cd .. && pwd)/__g" coverage.info.cleaned; fi - - if [ "$BUILD_TYPE" == "Coverage" ]; then cd .. && coveralls-lcov --repo-token ${COVERALLS_API_TOKEN} build/coverage.info.cleaned; fi + - if [ "$BUILD_TYPE" == "Coverage" ]; then ../.travis/report-coverage.sh; fi diff --git a/.travis/report-coverage.sh b/.travis/report-coverage.sh new file mode 100755 index 0000000..8a5bb38 --- /dev/null +++ b/.travis/report-coverage.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +echo "Reporting coverage to Coveralls.io ..." +echo "travis_fold:start:report-coverage" + +set -e + +while read FILENAME; do + LCOV_INPUT_FILES="$LCOV_INPUT_FILES -a \"$FILENAME\"" +done < <( find Coverage -name *.clean ) + +sed -i'' -e "s_$(cd .. && pwd)/__g" Coverage/coverage.info +lcov "${LCOV_INPUT_FILES}" -o Coverage/coverage.info + +cd .. +coveralls-lcov --repo-token ${COVERALLS_API_TOKEN} build/Coverage/coverage.info + +echo "travis_fold:end:report-coverage" |
