summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci/lcovrc5
-rw-r--r--tests/websocket-test.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/.gitlab-ci/lcovrc b/.gitlab-ci/lcovrc
index ac5997b7..2b21bdff 100644
--- a/.gitlab-ci/lcovrc
+++ b/.gitlab-ci/lcovrc
@@ -7,7 +7,8 @@ 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_
+# Also ignore g_clear macros as we don't care about the NULL path often
+lcov_excl_br_line = LCOV_EXCL_BR_LINE|g_return_if_fail|g_return_val_if_fail|g_assert|g_assert_|g_warn_if_fail|soup_test_assert|soup_test_assert_|g_clear_pointer|g_clear_object
# Similarly for unreachable assertions.
-lcov_excl_line = LCOV_EXCL_LINE|g_return_if_reached|g_return_val_if_reached|g_assert_not_reached
+lcov_excl_line = LCOV_EXCL_LINE|g_return_if_reached|g_return_val_if_reached|g_assert_not_reached|g_warn_if_reached
diff --git a/tests/websocket-test.c b/tests/websocket-test.c
index 95ed7b12..d045d966 100644
--- a/tests/websocket-test.c
+++ b/tests/websocket-test.c
@@ -51,6 +51,7 @@ typedef struct {
while (!(cond)) g_main_context_iteration (NULL, TRUE); \
G_STMT_END
+/* LCOV_EXCL_START */
static void
on_error_not_reached (SoupWebsocketConnection *ws,
GError *error,
@@ -59,6 +60,7 @@ on_error_not_reached (SoupWebsocketConnection *ws,
/* At this point we know this will fail, but is informative */
g_assert_no_error (error);
}
+/* LCOV_EXCL_STOP */
static void
on_error_copy (SoupWebsocketConnection *ws,