Skip to content

Commit 071a595

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
1 parent 7b12746 commit 071a595

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

.travis.yml

Lines changed: 31 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"
@@ -26,4 +31,29 @@ env:
2631
- TEST_DIR=wallet
2732
- RUST_TEST_THREADS=1 TEST_DIR=grin
2833

34+
after_success: |
35+
pwd &&
36+
echo "HERE" &&
37+
wget https://github.com/percytheprefect/kcov/archive/master.tar.gz &&
38+
tar xzf master.tar.gz &&
39+
cd kcov-master &&
40+
mkdir build &&
41+
cd build &&
42+
cmake .. &&
43+
make &&
44+
sudo make install &&
45+
cd ../.. &&
46+
rm -rf kcov-master &&
47+
cargo test --no-run &&
48+
cd ../
49+
pwd &&
50+
kcov --exclude-pattern=/.cargo,/usr/lib --verify target/cov target/debug/grin_core* &&
51+
echo "Finished coverage for grin_core"
52+
kcov --exclude-pattern=/.cargo,/usr/lib --verify target/cov target/debug/grin_chain* &&
53+
echo "Finished coverage for grin_chain"
54+
kcov --exclude-pattern=/.cargo,/usr/lib --verify target/cov target/debug/mine_simple_* &&
55+
echo "Finished coverage for mine_simple"
56+
bash <(curl -s https://codecov.io/bash) &&
57+
echo "Uploaded code coverage"
58+
2959
script: cd $TEST_DIR && cargo test --verbose

0 commit comments

Comments
 (0)