summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Griffis <pgriffis@igalia.com>2020-12-06 13:56:47 -0600
committerPatrick Griffis <pgriffis@igalia.com>2020-12-06 14:27:06 -0600
commit0b2020210b38b541e5a8786aeb5dcaaa5f858e46 (patch)
tree1bb1feb0a912edb6f8c528fa84232f1b0eb01148
parent8eea041cc8298a1336df968568267bac3feb2b23 (diff)
downloadlibsoup-wip/ci-test.tar.gz
coverage: Ignore more false positiveswip/ci-test
-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,