From 121e953c5d6e554477c5ca26cf97f4c2fe34645e Mon Sep 17 00:00:00 2001 From: Sangchul Lee Date: Mon, 18 Oct 2021 18:47:41 +0900 Subject: [PATCH] Apply macros to exclude lines from coverage measurement [Version] 0.2.126 [Issue Type] Line coverage Change-Id: I7ec0f6c1aaf05d23d393fb0d4fec098ad2b58599 Signed-off-by: Sangchul Lee --- packaging/capi-media-webrtc.spec | 2 +- src/webrtc_internal.c | 3 ++- src/webrtc_options.c | 2 ++ src/webrtc_signaling_client.c | 2 ++ src/webrtc_signaling_server.c | 2 ++ src/webrtc_source.c | 6 ++++++ src/webrtc_stats.c | 4 +++- src/webrtc_websocket.c | 2 ++ 8 files changed, 20 insertions(+), 3 deletions(-) diff --git a/packaging/capi-media-webrtc.spec b/packaging/capi-media-webrtc.spec index 1e2b46d3..a525020a 100644 --- a/packaging/capi-media-webrtc.spec +++ b/packaging/capi-media-webrtc.spec @@ -1,6 +1,6 @@ Name: capi-media-webrtc Summary: A WebRTC library in Tizen Native API -Version: 0.2.125 +Version: 0.2.126 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/webrtc_internal.c b/src/webrtc_internal.c index 3af38ad9..84fb66c5 100644 --- a/src/webrtc_internal.c +++ b/src/webrtc_internal.c @@ -17,6 +17,7 @@ #include "webrtc_internal.h" #include "webrtc_private.h" +//LCOV_EXCL_START int webrtc_set_ecore_wl_display(webrtc_h webrtc, unsigned int track_id, void *ecore_wl_window) { int ret = WEBRTC_ERROR_NONE; @@ -162,4 +163,4 @@ int webrtc_screen_source_unset_crop(webrtc_h webrtc, unsigned int source_id) return ret; } - +//LCOV_EXCL_STOP \ No newline at end of file diff --git a/src/webrtc_options.c b/src/webrtc_options.c index fc37189c..0a43bce6 100644 --- a/src/webrtc_options.c +++ b/src/webrtc_options.c @@ -17,6 +17,7 @@ #include "webrtc.h" #include "webrtc_private.h" +//LCOV_EXCL_START typedef struct { char *key; GType type; @@ -160,3 +161,4 @@ GstStructure* _get_structure_from_data_channel_options(bundle *options) return __get_matched_structure_from_bundle(options, data_channel_avail_options, "data-channel-options"); } +//LCOV_EXCL_STOP \ No newline at end of file diff --git a/src/webrtc_signaling_client.c b/src/webrtc_signaling_client.c index 2076ec91..17f509f5 100644 --- a/src/webrtc_signaling_client.c +++ b/src/webrtc_signaling_client.c @@ -18,6 +18,7 @@ #include "webrtc_private.h" #include "webrtc_internal.h" +//LCOV_EXCL_START static int __parse_message(gchar *message, webrtc_signaling_message_type_e *type, gchar **content) { gchar **contents; @@ -304,3 +305,4 @@ int webrtc_signaling_get_id(webrtc_signaling_client_h client, int *id) return WEBRTC_ERROR_NONE; } +//LCOV_EXCL_STOP \ No newline at end of file diff --git a/src/webrtc_signaling_server.c b/src/webrtc_signaling_server.c index a47d2ff8..98d24d55 100644 --- a/src/webrtc_signaling_server.c +++ b/src/webrtc_signaling_server.c @@ -18,6 +18,7 @@ #include "webrtc_private.h" #include "webrtc_internal.h" +//LCOV_EXCL_START #define SIGNALING_MESSAGE_REPLY_UNKNOWN_ERROR "ERROR unknown" #define SIGNALING_MESSAGE_REPLY_CONNECT_ERROR "ERROR connection" #define SIGNALING_MESSAGE_REPLY_SESSION_ERROR "ERROR session" @@ -503,3 +504,4 @@ int webrtc_signaling_server_destroy(webrtc_signaling_server_h server) return WEBRTC_ERROR_NONE; } +//LCOV_EXCL_STOP \ No newline at end of file diff --git a/src/webrtc_source.c b/src/webrtc_source.c index de920856..c428c89b 100644 --- a/src/webrtc_source.c +++ b/src/webrtc_source.c @@ -2661,6 +2661,7 @@ int _add_media_source(webrtc_s *webrtc, int type, unsigned int *source_id) return __add_media_source(webrtc, type, source_id); } +//LCOV_EXCL_START int _add_media_source_internal(webrtc_s *webrtc, int type, unsigned int *source_id) { RET_VAL_IF(webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL"); @@ -2671,6 +2672,7 @@ int _add_media_source_internal(webrtc_s *webrtc, int type, unsigned int *source_ return __add_media_source(webrtc, type, source_id); } +//LCOV_EXCL_STOP int _remove_media_source(webrtc_s *webrtc, unsigned int source_id) { @@ -3084,6 +3086,7 @@ static void __remove_filesrc_element(webrtc_gst_slot_s *source) source->media_types = 0; } +//LCOV_EXCL_START int _set_media_path(webrtc_s *webrtc, unsigned int source_id, const char *path) { webrtc_gst_slot_s *source = NULL; @@ -3121,6 +3124,7 @@ int _set_media_path(webrtc_s *webrtc, unsigned int source_id, const char *path) return WEBRTC_ERROR_NONE; } +//LCOV_EXCL_STOP static gboolean __check_path_is_not_set_cb(gpointer key, gpointer value, gpointer user_data) { @@ -4130,6 +4134,7 @@ int _get_display_visible_from_loopback(webrtc_s *webrtc, unsigned int track_id, return WEBRTC_ERROR_NONE; } +//LCOV_EXCL_START int _set_screen_source_crop(webrtc_s *webrtc, unsigned int source_id, int x, int y, int w, int h, bool portrait_mode, int *width, int *height) { webrtc_gst_slot_s *source = NULL; @@ -4281,3 +4286,4 @@ int _get_filesrc_looping(webrtc_s * webrtc, unsigned int source_id, bool *loopin return WEBRTC_ERROR_NONE; } +//LCOV_EXCL_STOP diff --git a/src/webrtc_stats.c b/src/webrtc_stats.c index 45864121..1a2bfeab 100644 --- a/src/webrtc_stats.c +++ b/src/webrtc_stats.c @@ -17,6 +17,7 @@ #include "webrtc.h" #include "webrtc_private.h" +//LCOV_EXCL_START typedef void (*__parse_stats_func)(const GstStructure *s, webrtc_callbacks_s *cb); /* @@ -584,4 +585,5 @@ void _unset_stats_timer(webrtc_s *webrtc) LOG_DEBUG("remove stats_timer_src[%u]", webrtc->stats_timer_src); webrtc->stats_timer_src = 0; -} \ No newline at end of file +} +//LCOV_EXCL_STOP \ No newline at end of file diff --git a/src/webrtc_websocket.c b/src/webrtc_websocket.c index 85bb6c73..46cf449e 100644 --- a/src/webrtc_websocket.c +++ b/src/webrtc_websocket.c @@ -17,6 +17,7 @@ #include "webrtc.h" #include "webrtc_private.h" +//LCOV_EXCL_START webrtc_websocket_s *_alloc_websocket(const int port, const char *ssl_cert_path, const char *ssl_private_key_path, const char *ssl_ca_path, _websocket_cb callback, void *user_data) { struct lws_protocols protocols[] = { @@ -116,3 +117,4 @@ int _stop_websocket(webrtc_websocket_s *ws) return WEBRTC_ERROR_NONE; } +//LCOV_EXCL_STOP \ No newline at end of file -- 2.34.1