coverage uploading to codecov.io

This commit is contained in:
2018-12-24 13:49:47 +07:00
parent 7fd2f5f1c2
commit 11b22924eb
5 changed files with 62 additions and 7 deletions

17
scripts/upload_coverage.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
set -e
BUILD_DIR=`dirname "$BASH_SOURCE"`/../build
mkdir -p $BUILD_DIR/coverage
cd $BUILD_DIR/coverage
cmake -DCMAKE_BUILD_TYPE=Debug -DECS_BUILD_WITH_COVERAGE=ON ../..
cmake --build . -- -j8
lcov -d . -z
ctest --verbose
lcov -d . -c -o "coverage.info"
lcov -r "coverage.info" "*/usr/*" "*/catch.hpp" "*/catch_main.cpp" -o "coverage.info"
lcov -l "coverage.info"
bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"