Mercurial > lbo > hg > sstable
changeset 85:9486965587ce
Improve coverage.sh script
author | Lewin Bormann <lbo@spheniscida.de> |
---|---|
date | Sat, 22 Feb 2020 23:19:54 +0100 |
parents | 5475511fe63d |
children | 91149bda8f74 |
files | coverage.sh |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/coverage.sh Wed Feb 19 22:00:14 2020 +0100 +++ b/coverage.sh Sat Feb 22 23:19:54 2020 +0100 @@ -1,9 +1,14 @@ #!/bin/bash +set -x + KCOV=kcov -KCOV_OPTS="--verify --exclude-pattern=/.cargo" +KCOV_OPTS="--exclude-pattern=/.cargo,/glibc,/usr/lib,/usr/include" KCOV_OUT="./kcov-out/" -TEST_BIN=$(cargo test 2>&1 >/dev/null | awk '/^ Running target\/debug\// { print $2 }') +export RUSTFLAGS="-C link-dead-code" +TEST_BIN=$(cargo test 2>&1 >/dev/null | awk '/^ Running target\/debug\/deps\// { print $2 }') + +echo $TEST_BIN ${KCOV} ${KCOV_OPTS} ${KCOV_OUT} ${TEST_BIN} && xdg-open ${KCOV_OUT}/index.html