Davide Pesavento | 6ebfd7c | 2017-08-26 17:52:54 -0400 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | set -e |
| 3 | |
| 4 | JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
| 5 | source "$JDIR"/util.sh |
| 6 | |
| 7 | set -x |
| 8 | |
| 9 | if [[ $JOB_NAME == *"code-coverage" ]]; then |
| 10 | lcov --quiet \ |
| 11 | --capture \ |
| 12 | --directory . \ |
| 13 | --no-external \ |
| 14 | --rc lcov_branch_coverage=1 \ |
| 15 | --output-file build/coverage-with-tests.info |
| 16 | |
| 17 | lcov --quiet \ |
| 18 | --remove build/coverage-with-tests.info "$PWD/tests/*" \ |
| 19 | --rc lcov_branch_coverage=1 \ |
| 20 | --output-file build/coverage.info |
| 21 | |
| 22 | genhtml --branch-coverage \ |
| 23 | --demangle-cpp \ |
| 24 | --frames \ |
| 25 | --legend \ |
| 26 | --output-directory build/coverage \ |
| 27 | --title "NLSR unit tests" \ |
| 28 | build/coverage.info |
| 29 | fi |