Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

Commit

Permalink
Fixing travis code coverage scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenldl committed Apr 1, 2018
1 parent d3c1588 commit ce1d07c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ after_success: |
TARGET=$HOME/kcov &&
export PATH=$TARGET/bin:$PATH &&
for file in target/debug/rsbx*; do if [[ $file == *.d ]]; then continue; fi; kcov --exclude-pattern=/.cargo,/usr/lib --verify "$HOME/target/cov/rsbx" "$file"; done &&
bash <(curl -s https://codecov.io/bash) &&
wget https://codecov.io/bash codecov_uploader &&
chmod u+x codecov_uploader &&
codecov_uploader -s "$HOME/target/cov/rsbx" &&
echo "Uploaded code coverage to Codecov" &&
for file in target/debug/rsbx*; do if [[ $file == *.d ]]; then continue; fi; kcov --coveralls-id=$TRAVIS_JOB_ID --exclude-pattern=/.cargo,/usr/lib --verify "$HOME/target/cov/rsbx" "$file"; done &&
echo "Uploaded code coverage to Coveralls"
8 changes: 6 additions & 2 deletions cov_tests/kcov_rsbx_fun.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ fi
mkdir -p "$HOME/target/cov/rsbx"

function kcov_rsbx() {
kcov --exclude-pattern=/.cargo,/usr/lib --verify "$HOME/target/cov/rsbx" rsbx "$@"; bash <(curl -s https://codecov.io/bash)
kcov --coveralls-id=$TRAVIS_JOB_ID --exclude-pattern=/.cargo,/usr/lib --verify "$HOME/target/cov/rsbx" rsbx "$@"
if [[ $TRAVIS == true ]]; then
kcov --exclude-pattern=/.cargo,/usr/lib --verify "$HOME/target/cov/rsbx" rsbx "$@"
kcov --coveralls-id=$TRAVIS_JOB_ID --exclude-pattern=/.cargo,/usr/lib --verify "$HOME/target/cov/rsbx" rsbx "$@"
else
kcov --exclude-pattern=/.cargo,/usr/lib --verify "../target/cov/rsbx" rsbx "$@"
fi
}

0 comments on commit ce1d07c

Please sign in to comment.