mirror of
https://github.com/mimblewimble/grin.git
synced 2025-02-01 08:51:08 +03:00
Add kcov support (#545)
* Adding kcov code coverage to chain and core modules * Adjust travis.yml to wget kcov from mimblewimble org * Add codecov badge to README.md * Fix repo name in badge to grin, from kcov
This commit is contained in:
parent
da4b349d49
commit
521678bd23
2 changed files with 32 additions and 2 deletions
32
.travis.yml
32
.travis.yml
|
@ -12,7 +12,12 @@ addons:
|
||||||
packages:
|
packages:
|
||||||
- g++-5
|
- g++-5
|
||||||
- cmake
|
- cmake
|
||||||
|
- libcurl4-openssl-dev
|
||||||
|
- libelf-dev
|
||||||
|
- libdw-dev
|
||||||
|
- cmake
|
||||||
|
- gcc
|
||||||
|
- binutils-dev
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- RUST_BACKTRACE="1"
|
- RUST_BACKTRACE="1"
|
||||||
|
@ -29,4 +34,29 @@ env:
|
||||||
- TEST_DIR=core
|
- TEST_DIR=core
|
||||||
- TEST_DIR=util
|
- TEST_DIR=util
|
||||||
|
|
||||||
|
after_success: |
|
||||||
|
pwd &&
|
||||||
|
echo "HERE" &&
|
||||||
|
wget https://github.com/mimblewimble/kcov/archive/master.tar.gz &&
|
||||||
|
tar xzf master.tar.gz &&
|
||||||
|
cd kcov-master &&
|
||||||
|
mkdir build &&
|
||||||
|
cd build &&
|
||||||
|
cmake .. &&
|
||||||
|
make &&
|
||||||
|
sudo make install &&
|
||||||
|
cd ../.. &&
|
||||||
|
rm -rf kcov-master &&
|
||||||
|
cargo test --no-run &&
|
||||||
|
cd ../
|
||||||
|
pwd &&
|
||||||
|
kcov --exclude-pattern=/.cargo,/usr/lib --verify target/cov target/debug/grin_core* &&
|
||||||
|
echo "Finished coverage for grin_core"
|
||||||
|
kcov --exclude-pattern=/.cargo,/usr/lib --verify target/cov target/debug/grin_chain* &&
|
||||||
|
echo "Finished coverage for grin_chain"
|
||||||
|
kcov --exclude-pattern=/.cargo,/usr/lib --verify target/cov target/debug/mine_simple_* &&
|
||||||
|
echo "Finished coverage for mine_simple"
|
||||||
|
bash <(curl -s https://codecov.io/bash) &&
|
||||||
|
echo "Uploaded code coverage"
|
||||||
|
|
||||||
script: cd $TEST_DIR && cargo test --verbose
|
script: cd $TEST_DIR && cargo test --verbose
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[![Build Status](https://travis-ci.org/mimblewimble/grin.svg?branch=master)](https://travis-ci.org/mimblewimble/grin) [![Gitter chat](https://badges.gitter.im/grin_community/Lobby.png)](https://gitter.im/grin_community/Lobby)
|
[![Build Status](https://travis-ci.org/mimblewimble/grin.svg?branch=master)](https://travis-ci.org/mimblewimble/grin) [![Gitter chat](https://badges.gitter.im/grin_community/Lobby.png)](https://gitter.im/grin_community/Lobby) [![Codecov coverage status](https://codecov.io/gh/mimblewimble/grin/branch/master/graph/badge.svg)](https://codecov.io/gh/mimblewimble/grin)
|
||||||
|
|
||||||
# Grin
|
# Grin
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue