blob: 981bdc0cca0b4c2aed324703a021da1acf68eaf9 [file] [log] [blame]
Davide Pesavento6ebfd7c2017-08-26 17:52:54 -04001#!/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 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
29fi