From cb79859c0ed67b9e3c839540f5fc0442aecff673 Mon Sep 17 00:00:00 2001 From: "Denis S. Soldatov aka General-Beck" Date: Thu, 16 Mar 2017 01:21:58 +0300 Subject: [PATCH] Update cov.sh update coverage for RUST&JS [ci skip] --- scripts/cov.sh | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/scripts/cov.sh b/scripts/cov.sh index 7f21e9804..13ab792c7 100755 --- a/scripts/cov.sh +++ b/scripts/cov.sh @@ -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