Skip to content

Commit

Permalink
Enable coverage via grcov
Browse files Browse the repository at this point in the history
  • Loading branch information
garious committed Oct 4, 2018
1 parent f90488c commit 490dbdb
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions ci/test-nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,23 @@ maybe_cargo_install() {

maybe_cargo_install cov

if [[ ! -f ./grcov ]]; then
uname=$(uname | tr '[:upper:]' '[:lower:]')
uname_m=$(uname -m | tr '[:upper:]' '[:lower:]')
name=grcov-${uname}-${uname_m}.tar.bz2
_ wget "https://github.com/mozilla/grcov/releases/download/v0.2.3/${name}"
_ tar -xzf "${name}"
fi

_ cargo cov clean
_ cargo cov test --lib
_ cargo cov report

echo --- Coverage report:
ls -l target/cov/report/index.html
_ ./grcov . -t lcov > lcov.info

if [[ -z "$CODECOV_TOKEN" ]]; then
echo CODECOV_TOKEN undefined
genhtml -o target/cov/report --show-details --highlight --ignore-errors source --legend lcov.info
echo --- Coverage report:
ls -l target/cov/report/index.html
else
# TODO: Fix this.
true
#bash <(curl -s https://codecov.io/bash) -x 'llvm-cov-7 gcov'
bash <(curl -s https://codecov.io/bash) -X gcov
fi

0 comments on commit 490dbdb

Please sign in to comment.