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
|
# Installing KCOV under ubuntu
|
||||||
# https://users.rust-lang.org/t/tutorial-how-to-collect-test-coverages-for-rust-project/650#
|
# https://users.rust-lang.org/t/tutorial-how-to-collect-test-coverages-for-rust-project/650#
|
||||||
### Install deps
|
### Install deps
|
||||||
@ -24,8 +24,7 @@ fi
|
|||||||
cargo test $TARGETS --no-run || exit $?
|
cargo test $TARGETS --no-run || exit $?
|
||||||
|
|
||||||
|
|
||||||
|
KCOV_TARGET="target/cov"
|
||||||
KCOV_TARGET="target/kcov"
|
|
||||||
KCOV_FLAGS="--verify"
|
KCOV_FLAGS="--verify"
|
||||||
EXCLUDE="/usr/lib,\
|
EXCLUDE="/usr/lib,\
|
||||||
/usr/include,\
|
/usr/include,\
|
||||||
@ -39,17 +38,25 @@ util/src/network/tests,\
|
|||||||
ethcore/src/evm/tests,\
|
ethcore/src/evm/tests,\
|
||||||
ethstore/tests,\
|
ethstore/tests,\
|
||||||
target/debug/build,\
|
target/debug/build,\
|
||||||
target/release/build\
|
target/release/build,\
|
||||||
|
*.db
|
||||||
"
|
"
|
||||||
|
|
||||||
rm -rf $KCOV_TARGET
|
rm -rf $KCOV_TARGET
|
||||||
mkdir -p $KCOV_TARGET
|
mkdir -p $KCOV_TARGET
|
||||||
|
echo "Cover RUST"
|
||||||
for FILE in `find target/debug/deps ! -name "*.*"`
|
for FILE in `find target/debug/deps ! -name "*.*"`
|
||||||
do
|
do
|
||||||
$KCOV --exclude-pattern $EXCLUDE $KCOV_FLAGS $KCOV_TARGET $FILE
|
$KCOV --exclude-pattern $EXCLUDE $KCOV_FLAGS $KCOV_TARGET $FILE
|
||||||
done
|
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
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user