summaryrefslogtreecommitdiff
path: root/.travis/report-coverage.sh
blob: dbbefa9dc2b0418cc723332c06c5828f4b03f26d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env bash

set -e

echo "Reporting coverage to Coveralls.io ..."

while read FILENAME; do
  LCOV_INPUT_FILES="$LCOV_INPUT_FILES -a \"$FILENAME\""
done < <( find Coverage -name *.clean )

eval lcov "${LCOV_INPUT_FILES}" -o Coverage/coverage.info
sed -i'' -e "s_$(cd .. && pwd)/__g" Coverage/coverage.info

cd ..
coveralls-lcov --repo-token ${COVERALLS_API_TOKEN} build/Coverage/coverage.info