summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml3
-rwxr-xr-x.travis/report-coverage.sh18
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"