pyo3/ci/travis/cover.sh

24 lines
663 B
Bash
Raw Normal View History

#!/bin/sh
2018-05-21 13:25:09 +00:00
set -ex
2018-05-05 12:19:50 +00:00
### Run kcov in parallel #######################################################
rm -f target/debug/pyo3-*.d
rm -f target/debug/test_*.d
rm -f target/debug/test_doc-*
# echo $FILES
FILES=$(find . -path ./target/debug/pyo3-\* -or -path ./target/debug/test_\*)
echo $FILES | xargs -n1 -P $(nproc) sh -c '
dir="target/cov/$(basename $@)"
mkdir -p $dir
echo "Collecting coverage data of $(basename $@)"
kcov --exclude-pattern=/.cargo,/usr/lib --verify $dir "$@" 2>&1 >/dev/null
' _
### Upload coverage ############################################################
echo "Uploading code coverage"
curl -SsL https://codecov.io/bash | bash