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

Commit

Permalink
Running more tests wrt code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenldl committed Apr 1, 2018
1 parent 3390169 commit a513a76
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ branches:
- dev

script:
- cargo build --verbose --all
# - cargo build --verbose --all
- cargo test --verbose --all
- bash install_kcov.sh
- bash cov_tests/dev_tests.sh
- bash tests/dev_tests.sh
# - bash tests/dev_tests.sh

env:
global:
Expand All @@ -38,6 +38,7 @@ after_success: |
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 &&
wget https://codecov.io/bash -O codecov_uploader &&
chmod u+x codecov_uploader &&
ls -l "$HOME/target/cov/rsbx" &&
./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 &&
Expand Down
2 changes: 2 additions & 0 deletions cov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ for file in target/debug/rsbx-*; do if [[ $file == *.d ]]; then continue; fi
kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/rsbx" "$file"
done

exit 0

for file in ${files[@]}; do
if [[ $file == *.d ]]; then continue; fi
# mkdir -p "target/cov/$(basename $file)"
Expand Down
7 changes: 3 additions & 4 deletions cov_tests/kcov_rsbx_fun.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ if [[ $TRAVIS == true ]]; then
export PATH=$TARGET/bin:$PATH
fi

mkdir -p "$HOME/target/cov/rsbx"

function kcov_rsbx() {
if [[ $TRAVIS == true ]]; then
kcov --exclude-pattern=/.cargo,/usr/lib --verify "$HOME/target/cov/rsbx" rsbx "$@" &>/dev/null
mkdir -p "$HOME/target/cov/rsbx"
kcov --coveralls-id=$TRAVIS_JOB_ID --exclude-pattern=/.cargo,/usr/lib --verify "$HOME/target/cov/rsbx" rsbx "$@" &>/dev/null
./rsbx "$@"
kcov --exclude-pattern=/.cargo,/usr/lib --verify "$HOME/target/cov/rsbx" rsbx "$@"
#./rsbx "$@"
else
kcov --exclude-pattern=/.cargo,/usr/lib --verify "../target/cov/rsbx" rsbx "$@"
fi
Expand Down

0 comments on commit a513a76

Please sign in to comment.