Alexander Afanasyev | a9369b4 | 2017-01-11 11:58:00 -0800 | [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 | gcovr --object-directory=build \ |
| 11 | --output=build/coverage.xml \ |
| 12 | --exclude="$PWD/(tests)" \ |
| 13 | --root=. \ |
| 14 | --xml |
| 15 | |
| 16 | # Generate also a detailed HTML output |
| 17 | mkdir build/coverage |
| 18 | gcovr --object-directory=build \ |
| 19 | --output=build/coverage/index.html \ |
| 20 | --exclude="$PWD/(tests)" \ |
| 21 | --root=. \ |
| 22 | --html \ |
| 23 | --html-details |
| 24 | fi |