blob: 56baf77ba985281fd974fa211420365f5dfe39ba [file] [log] [blame]
Davide Pesavento6ebfd7c2017-08-26 17:52:54 -04001#!/usr/bin/env bash
Davide Pesaventof6be8e32020-04-30 16:06:03 -04002set -ex
Davide Pesavento6ebfd7c2017-08-26 17:52:54 -04003
4if [[ $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 \
Davide Pesavento6ebfd7c2017-08-26 17:52:54 -040019 --legend \
20 --output-directory build/coverage \
21 --title "NLSR unit tests" \
22 build/coverage.info
23fi