From 6c10bb32479ebc700b49035222fa3f523a2da84f Mon Sep 17 00:00:00 2001 From: Nikolay Volf Date: Tue, 2 Feb 2016 03:24:31 -0800 Subject: [PATCH 1/3] local coverage --- cov.sh | 2 +- cov.sh~ | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100755 cov.sh~ diff --git a/cov.sh b/cov.sh index 371746a39..6936d25be 100755 --- a/cov.sh +++ b/cov.sh @@ -17,5 +17,5 @@ fi cargo test --no-run || exit $? mkdir -p target/coverage -kcov --exclude-pattern ~/.multirust,rocksdb,secp256k1 --include-pattern src --verify target/coverage target/debug/ethcore* +kcov --exclude-pattern ~/.multirust,rocksdb,secp256k1 --include-pattern src --verify target/coverage target/debug/deps/ethcore* xdg-open target/coverage/index.html diff --git a/cov.sh~ b/cov.sh~ new file mode 100755 index 000000000..17466d506 --- /dev/null +++ b/cov.sh~ @@ -0,0 +1,21 @@ +#!/bin/sh +# Installing KCOV under ubuntu +# https://users.rust-lang.org/t/tutorial-how-to-collect-test-coverages-for-rust-project/650# +### Install deps +# $ sudo apt-get install libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc binutils-dev libiberty-dev +# +### Compile kcov +# $ wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz && tar xf master.tar.gz +# $ cd kcov-master && mkdir build && cd build +# $ cmake .. && make && sudo make install + +### Running coverage +if ! type kcov > /dev/null; then + echo "Install kcov first (details inside this file). Aborting." + exit 1 +fi + +cargo test --no-run || exit $? +mkdir -p target/coverage +kcov --exclude-pattern ~/.multirust,rocksdb,secp256k1 --include-pattern src --verify target/coverage target/debug/parity* +xdg-open target/coverage/index.html From b119e2cbb1a96b5ab89eca1c55cce68bd98b92c1 Mon Sep 17 00:00:00 2001 From: Nikolay Volf Date: Tue, 2 Feb 2016 03:26:19 -0800 Subject: [PATCH 2/3] removed trash --- cov.sh~ | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100755 cov.sh~ diff --git a/cov.sh~ b/cov.sh~ deleted file mode 100755 index 17466d506..000000000 --- a/cov.sh~ +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# Installing KCOV under ubuntu -# https://users.rust-lang.org/t/tutorial-how-to-collect-test-coverages-for-rust-project/650# -### Install deps -# $ sudo apt-get install libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc binutils-dev libiberty-dev -# -### Compile kcov -# $ wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz && tar xf master.tar.gz -# $ cd kcov-master && mkdir build && cd build -# $ cmake .. && make && sudo make install - -### Running coverage -if ! type kcov > /dev/null; then - echo "Install kcov first (details inside this file). Aborting." - exit 1 -fi - -cargo test --no-run || exit $? -mkdir -p target/coverage -kcov --exclude-pattern ~/.multirust,rocksdb,secp256k1 --include-pattern src --verify target/coverage target/debug/parity* -xdg-open target/coverage/index.html From 33499fd6984dbcc14e68f19f5b64d7732a3f0a4f Mon Sep 17 00:00:00 2001 From: Nikolay Volf Date: Tue, 2 Feb 2016 03:32:28 -0800 Subject: [PATCH 3/3] package spec --- cov.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cov.sh b/cov.sh index 6936d25be..a78e36205 100755 --- a/cov.sh +++ b/cov.sh @@ -15,7 +15,7 @@ if ! type kcov > /dev/null; then exit 1 fi -cargo test --no-run || exit $? +cargo test -p ethcore --no-run || exit $? mkdir -p target/coverage kcov --exclude-pattern ~/.multirust,rocksdb,secp256k1 --include-pattern src --verify target/coverage target/debug/deps/ethcore* xdg-open target/coverage/index.html