Update cov.sh
update coverage for RUST&JS [ci skip]
This commit is contained in:
parent
790bd87bc3
commit
cb79859c0e
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Installing KCOV under ubuntu
|
||||
# https://users.rust-lang.org/t/tutorial-how-to-collect-test-coverages-for-rust-project/650#
|
||||
### Install deps
|
||||
@ -24,8 +24,7 @@ fi
|
||||
cargo test $TARGETS --no-run || exit $?
|
||||
|
||||
|
||||
|
||||
KCOV_TARGET="target/kcov"
|
||||
KCOV_TARGET="target/cov"
|
||||
KCOV_FLAGS="--verify"
|
||||
EXCLUDE="/usr/lib,\
|
||||
/usr/include,\
|
||||
@ -39,17 +38,25 @@ util/src/network/tests,\
|
||||
ethcore/src/evm/tests,\
|
||||
ethstore/tests,\
|
||||
target/debug/build,\
|
||||
target/release/build\
|
||||
target/release/build,\
|
||||
*.db
|
||||
"
|
||||
|
||||
rm -rf $KCOV_TARGET
|
||||
mkdir -p $KCOV_TARGET
|
||||
|
||||
echo "Cover RUST"
|
||||
for FILE in `find target/debug/deps ! -name "*.*"`
|
||||
do
|
||||
$KCOV --exclude-pattern $EXCLUDE $KCOV_FLAGS $KCOV_TARGET $FILE
|
||||
done
|
||||
|
||||
$KCOV --coveralls-id=${CI_BUILD_ID} --exclude-pattern $EXCLUDE $KCOV_FLAGS $KCOV_TARGET target/debug/parity-*
|
||||
$KCOV --exclude-pattern $EXCLUDE $KCOV_FLAGS $KCOV_TARGET target/debug/parity-*
|
||||
echo "Cover JS"
|
||||
cd js
|
||||
npm install&&npm run test:coverage
|
||||
cd ..
|
||||
codecov
|
||||
bash <(curl -s https://codecov.io/bash)&&
|
||||
echo "Uploaded code coverage"
|
||||
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user