Skip to content

Commit f3d3b34

Browse files
Adding kcov code coverage to chain and core modules
Fixing bug in .yml file Adding cargo test --no-run command to after_success Removing comment, adding pwd to see what working directory is Debugging working directory for .yml file Replacing binutils with libbfd-dev Removing libbfd-dev because it fails the build Adding test coverage to rest of grin modules
1 parent da4b349 commit f3d3b34

File tree

1 file changed

+42
-1
lines changed

1 file changed

+42
-1
lines changed

.travis.yml

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@ addons:
1212
packages:
1313
- g++-5
1414
- cmake
15-
15+
- libcurl4-openssl-dev
16+
- libelf-dev
17+
- libdw-dev
18+
- cmake
19+
- gcc
20+
- binutils-dev
1621
env:
1722
global:
1823
- RUST_BACKTRACE="1"
@@ -29,4 +34,40 @@ env:
2934
- TEST_DIR=core
3035
- TEST_DIR=util
3136

37+
after_success: |
38+
pwd &&
39+
wget https://github.com/percytheprefect/kcov/archive/master.tar.gz &&
40+
tar xzf master.tar.gz &&
41+
cd kcov-master &&
42+
mkdir build &&
43+
cd build &&
44+
cmake .. &&
45+
make &&
46+
sudo make install &&
47+
cd ../.. &&
48+
rm -rf kcov-master &&
49+
cargo test --no-run &&
50+
cd ../
51+
pwd &&
52+
kcov --exclude-pattern=/.cargo,/usr/lib --verify target/cov target/debug/grin_core* &&
53+
echo "Finished coverage for grin_core"
54+
kcov --exclude-pattern=/.cargo,/usr/lib --verify target/cov target/debug/grin_chain* &&
55+
echo "Finished coverage for grin_chain"
56+
kcov --exclude-pattern=/.cargo,/usr/lib --verify target/cov target/debug/grin_keychain* &&
57+
echo "Finished coverage for grin_keychain"
58+
kcov --exclude-pattern=/.cargo,/usr/lib --verify target/cov target/debug/grin_p2p* &&
59+
echo "Finished coverage for grin_p2p"
60+
kcov --exclude-pattern=/.cargo,/usr/lib --verify target/cov target/debug/grin_pow* &&
61+
echo "Finished coverage for grin_pow"
62+
kcov --exclude-pattern=/.cargo,/usr/lib --verify target/cov target/debug/grin_store* &&
63+
echo "Finished coverage for grin_store"
64+
kcov --exclude-pattern=/.cargo,/usr/lib --verify target/cov target/debug/grin_wallet* &&
65+
echo "Finished coverage for grin_wallet"
66+
kcov --exclude-pattern=/.cargo,/usr/lib --verify target/cov target/debug/grin_util* &&
67+
echo "Finished coverage for grin_util"
68+
kcov --exclude-pattern=/.cargo,/usr/lib --verify target/cov target/debug/mine_simple* &&
69+
echo "Finished coverage for mine_simple"
70+
bash <(curl -s https://codecov.io/bash) &&
71+
echo "Uploaded code coverage"
72+
3273
script: cd $TEST_DIR && cargo test --verbose

0 commit comments

Comments
 (0)