coverage uploading to codecov.io

This commit is contained in:
2018-12-24 12:56:00 +07:00
parent 2a24233a8e
commit 0f47fe61d1
5 changed files with 60 additions and 5 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"