blob: 5e89f0706695d67f6048be7078101485d542059c [file] [log] [blame]
Alexander Afanasyeva9369b42017-01-11 11:58:00 -08001#!/usr/bin/env bash
2set -e
3
4JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
5source "$JDIR"/util.sh
6
7set -x
8
9if [[ $JOB_NAME == *"code-coverage" ]]; then
10 gcovr --object-directory=build \
11 --output=build/coverage.xml \
12 --exclude="$PWD/(tests)" \
13 --root=. \
14 --xml
15
Alexander Afanasyevb403dbc2017-01-15 23:42:01 -080016 # # Generate also a detailed HTML output, but using lcov (slower, but better results)
17 lcov -q -c -d . --no-external -o build/coverage-with-tests.info
18 lcov -q -r build/coverage-with-tests.info "$PWD/tests/*" -o build/coverage.info
19 genhtml build/coverage.info --output-directory build/coverage --legend
Alexander Afanasyeva9369b42017-01-11 11:58:00 -080020fi