mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 22:46:15 +01:00
8efe28c570
While we can’t add markers to the macro implementations to cause lcov to ignore them automatically, we can change our lcov configuration to ignore all calls to them. See https://github.com/linux-test-project/lcov/issues/44. This causes all the un-takeable branches and un-reachable assertions to be ignored by our code coverage, which bumps our statistics: • Lines: 74.9% → 74.8% • Functions: 82.3% → 82.3% • Branches: 53.3% → 64.2% The rationale is that nobody should be testing programmer error handling, as g_return_*if_fail() are used to guard against — so it’s not reasonable to count missed branches like that in code coverage statistics. Signed-off-by: Philip Withnall <withnall@endlessm.com>
13 lines
577 B
Plaintext
13 lines
577 B
Plaintext
# lcov and genhtml configuration
|
|
# See http://ltp.sourceforge.net/coverage/lcov/lcovrc.5.php
|
|
|
|
# Always enable branch coverage
|
|
lcov_branch_coverage = 1
|
|
|
|
# Exclude precondition assertions, as we can never reasonably get full branch
|
|
# coverage of them, as they should never normally fail.
|
|
# See https://github.com/linux-test-project/lcov/issues/44
|
|
lcov_excl_br_line = LCOV_EXCL_BR_LINE|g_return_if_fail|g_return_val_if_fail|g_assert|g_assert_
|
|
|
|
# Similarly for unreachable assertions.
|
|
lcov_excl_line = LCOV_EXCL_LINE|g_return_if_reached|g_return_val_if_reached|g_assert_not_reached |