coverage uploading to codecov.io

This commit is contained in:
2018-12-24 10:01:24 +07:00
parent 008f12004d
commit c6b2fca646
7 changed files with 259 additions and 6 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"