From: Eunhae Choi Date: Wed, 5 Sep 2018 07:59:05 +0000 (+0900) Subject: Apply excluding block for line coverage checking X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5b8079658febb966e8d60bd4967cdfca47a16c0f;p=platform%2Fcore%2Fapi%2Fplayer.git Apply excluding block for line coverage checking Change-Id: Ia5646795eda103a8a2d50aba96e4a52e894ca2d7 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 211090a..5bab16f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,7 @@ FOREACH(mmsvcflag ${MMSVC_PLAYER_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${mmsvcflag}") ENDFOREACH(mmsvcflag) -SET(CMAKE_C_FLAGS "-I./${INC_DIR} ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror -Wno-deprecated -Wno-deprecated-declarations") +SET(CMAKE_C_FLAGS "-I./${INC_DIR} ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror -Wno-deprecated -Wno-deprecated-declarations -fprofile-arcs -ftest-coverage") SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") IF("${ARCH}" STREQUAL "arm") diff --git a/src/player.c b/src/player.c index 94494a3..4279dfb 100644 --- a/src/player.c +++ b/src/player.c @@ -146,6 +146,7 @@ int _player_send_msg_async(int send_fd, char* msg) return PLAYER_ERROR_NONE; } +//LCOV_EXCL_START static tizen_profile_t _get_tizen_profile() { char *profileName; @@ -179,6 +180,7 @@ static tizen_profile_t _get_tizen_profile() return profile; } +//LCOV_EXCL_STOP static int _get_current_state(player_cli_s *pc, player_state_e *pstate) { @@ -403,6 +405,7 @@ static int player_recv_msg(callback_cb_info_s * cb_info, tbm_fd *tfd) return 0; } +//LCOV_EXCL_START /* check the first msg */ if (buff->part_of_msg && buff->recvMsg[0] != '{') { @@ -451,7 +454,7 @@ static int player_recv_msg(callback_cb_info_s * cb_info, tbm_fd *tfd) recvLen -= part_len; } } - +//LCOV_EXCL_STOP return recvLen; } @@ -543,6 +546,7 @@ static void __prepare_cb_handler(callback_cb_info_s * cb_info, _player_recv_data set_null_user_cb(cb_info, ev); } +//LCOV_EXCL_START static void __complete_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *recv_data) { muse_player_event_e ev = MUSE_PLAYER_EVENT_TYPE_COMPLETE; @@ -563,6 +567,7 @@ static void __interrupt_cb_handler(callback_cb_info_s * cb_info, _player_recv_da muse_player_event_e ev = MUSE_PLAYER_EVENT_TYPE_INTERRUPT; ((player_interrupted_cb) cb_info->user_cb[ev]) (PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT, cb_info->user_data[ev]); } +//LCOV_EXCL_STOP static void __error_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *recv_data) { @@ -580,12 +585,14 @@ static void __error_cb_handler(callback_cb_info_s * cb_info, _player_recv_data * } } +//LCOV_EXCL_START static void __disconnected_error_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *recv_data) { muse_player_event_e ev = MUSE_PLAYER_EVENT_TYPE_ERROR; ((player_error_cb) cb_info->user_cb[ev]) (PLAYER_ERROR_SERVICE_DISCONNECTED, cb_info->user_data[ev]); } +//LCOV_EXCL_STOP static void __buffering_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *recv_data) { @@ -965,6 +972,7 @@ static void __media_packet_video_frame_cb_handler(callback_cb_info_s * cb_info, memset(recv_data->tfd, INVALID_DEFAULT_VALUE, sizeof(recv_data->tfd)); return; +//LCOV_EXCL_START ERROR: if (pkt) media_packet_destroy(pkt); @@ -987,8 +995,10 @@ ERROR: PLAYER_SEND_MSG_ASYNC_WITH_NO_RETURN(MUSE_PLAYER_API_RETURN_VIDEO_DATA, cb_info->fd, MUSE_TYPE_POINTER, "v_data", v_data); return; +//LCOV_EXCL_STOP } +//LCOV_EXCL_START static void __audio_frame_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *recv_data) { tbm_bo bo = NULL; @@ -1065,6 +1075,8 @@ static void __missed_plugin_cb_handler(callback_cb_info_s * cb_info, _player_rec { } +//LCOV_EXCL_STOP + static void __media_stream_video_buffer_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *recv_data) { /* player_media_stream_buffer_status_e status; */ @@ -1076,6 +1088,7 @@ static void __media_stream_video_buffer_cb_handler(callback_cb_info_s * cb_info, } } +//LCOV_EXCL_START static void __media_stream_audio_buffer_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *recv_data) { /* player_media_stream_buffer_status_e status; */ @@ -1125,6 +1138,7 @@ static void __media_stream_audio_buffer_cb_handler_ex(callback_cb_info_s * cb_in } } +//LCOV_EXCL_STOP static void __media_stream_video_seek_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *recv_data) { @@ -1137,6 +1151,7 @@ static void __media_stream_video_seek_cb_handler(callback_cb_info_s * cb_info, _ } } +//LCOV_EXCL_START static void __media_stream_audio_seek_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *recv_data) { unsigned long long offset; @@ -1147,6 +1162,7 @@ static void __media_stream_audio_seek_cb_handler(callback_cb_info_s * cb_info, _ (offset, cb_info->user_data[MUSE_PLAYER_EVENT_TYPE_MEDIA_STREAM_AUDIO_SEEK]); } } +//LCOV_EXCL_STOP static void __video_stream_changed_cb_handler(callback_cb_info_s * cb_info, _player_recv_data *recv_data) { @@ -1583,6 +1599,7 @@ static void _remove_all_ret_msg(callback_cb_info_s * cb_info) } } +//LCOV_EXCL_START static void _notify_disconnected(callback_cb_info_s * cb_info) { muse_player_event_e event = MUSE_PLAYER_EVENT_TYPE_SERVICE_DISCONNECTED; @@ -1603,6 +1620,7 @@ static void _notify_disconnected(callback_cb_info_s * cb_info) _player_event_queue_add(&cb_info->event_queue, data); } } +//LCOV_EXCL_STOP static void *client_cb_handler(gpointer data) { @@ -2872,6 +2890,7 @@ int _player_convert_display_type(player_display_type_e type, player_private_disp case PLAYER_DISPLAY_TYPE_OVERLAY: *out_type = PLAYER_PRIVATE_DISPLAY_TYPE_OVERLAY; break; +//LCOV_EXCL_START case PLAYER_DISPLAY_TYPE_OBSOLETE_EVAS_WNONE: if (_get_tizen_profile() == TIZEN_PROFILE_WEARABLE) *out_type = PLAYER_PRIVATE_DISPLAY_TYPE_NONE; @@ -2884,6 +2903,7 @@ int _player_convert_display_type(player_display_type_e type, player_private_disp else *out_type = PLAYER_PRIVATE_DISPLAY_TYPE_NONE; break; +//LCOV_EXCL_STOP case PLAYER_DISPLAY_TYPE_EVAS: *out_type = PLAYER_PRIVATE_DISPLAY_TYPE_EVAS; break; @@ -4009,6 +4029,7 @@ int player_set_completed_cb(player_h player, player_completed_cb callback, void } #ifdef TIZEN_FEATURE_EVAS_RENDERER +//LCOV_EXCL_START static void __retrieve_buffer_cb(void *user_data) { player_cli_s *player = (player_cli_s *)user_data; @@ -4027,6 +4048,7 @@ static void __retrieve_buffer_cb(void *user_data) if (ret != PLAYER_ERROR_NONE) LOGI("mm_evas_renderer_retrieve_all_packets returned error"); } +//LCOV_EXCL_STOP static int __player_set_retrieve_buffer_cb(player_h player, player_retrieve_buffer_cb callback, void *user_data) {