Davide Pesavento | 87d4e20 | 2020-08-09 01:18:52 -0400 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | set -ex |
| 3 | |
| 4 | if [[ $JOB_NAME == *"code-coverage" ]]; then |
| 5 | lcov --quiet \ |
| 6 | --capture \ |
| 7 | --directory . \ |
| 8 | --no-external \ |
| 9 | --rc lcov_branch_coverage=1 \ |
| 10 | --output-file build/coverage-with-tests.info |
| 11 | |
| 12 | lcov --quiet \ |
| 13 | --remove build/coverage-with-tests.info "$PWD/tests/*" \ |
| 14 | --rc lcov_branch_coverage=1 \ |
| 15 | --output-file build/coverage.info |
| 16 | |
| 17 | genhtml --branch-coverage \ |
| 18 | --demangle-cpp \ |
| 19 | --legend \ |
| 20 | --output-directory build/coverage \ |
| 21 | --title "PSync unit tests" \ |
| 22 | build/coverage.info |
| 23 | fi |