From: Gilbok Lee Date: Wed, 4 Dec 2019 09:24:37 +0000 (+0900) Subject: Add coverage exception macros X-Git-Tag: accepted/tizen/unified/20200109.065519~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fapi%2Fvideo-util.git;a=commitdiff_plain;h=28ffd52bf12068c36d1634161c70540793ddbd56 Add coverage exception macros [Version] 0.1.14 [Issue Type] Line coverage Change-Id: Icc7b5ccdd81ca2ea9006d92df5267c9adc9dad51 --- diff --git a/include/video_util_private.h b/include/video_util_private.h index 31b1c67..28efd01 100644 --- a/include/video_util_private.h +++ b/include/video_util_private.h @@ -28,6 +28,15 @@ #define LOG_TAG "CAPI_MEDIA_VIDEO_UTIL" +#ifdef TIZEN_EXCLUDE_COVERAGE +#define video_util_debug(fmt, arg...) +#define video_util_info(fmt, arg...) +#define video_util_error(fmt, arg...) +#define video_util_debug_fenter() +#define video_util_debug_fleave() +#define video_util_secure_info(fmt, arg...) +#define video_util_deprecated_log(function) +#else #define video_util_debug(fmt, arg...) do { \ LOGD(""fmt"", ##arg); \ } while (0) @@ -52,10 +61,11 @@ SECURE_LOGI(""fmt"", ##arg); \ } while (0) -#define video_util_deprecated_log(fuction) do { \ +#define video_util_deprecated_log(function) do { \ LOGW("DEPRECATION WARNING: %s() is deprecated and will be removed "\ - "from next release.", fuction); \ + "from next release.", function); \ } while (0) +#endif typedef bool(*video_util_supported_type_cb)(int type, void *user_data); diff --git a/packaging/capi-media-video-util.spec b/packaging/capi-media-video-util.spec index b2ce1be..a3a6974 100644 --- a/packaging/capi-media-video-util.spec +++ b/packaging/capi-media-video-util.spec @@ -1,6 +1,6 @@ Name: capi-media-video-util Summary: A Video Utility library in Tizen Native API -Version: 0.1.13 +Version: 0.1.14 Release: 0 Group: System/Libraries License: Apache-2.0 @@ -45,9 +45,9 @@ cp %{SOURCE1001} . %build %if 0%{?gcov:1} -export CFLAGS+=" -fprofile-arcs -ftest-coverage" -export CXXFLAGS+=" -fprofile-arcs -ftest-coverage" -export FFLAGS+=" -fprofile-arcs -ftest-coverage" +export CFLAGS+=" -DTIZEN_EXCLUDE_COVERAGE -fprofile-arcs -ftest-coverage" +export CXXFLAGS+=" -DTIZEN_EXCLUDE_COVERAG -fprofile-arcs -ftest-coverage" +export FFLAGS+=" -DTIZEN_EXCLUDE_COVERAGE -fprofile-arcs -ftest-coverage" export LDFLAGS+=" -lgcov" %endif diff --git a/src/video_util.c b/src/video_util.c index fccfd68..07d6676 100644 --- a/src/video_util.c +++ b/src/video_util.c @@ -203,7 +203,7 @@ static bool __video_util_check_fps(int fps) return true; } - +//LCOV_EXCL_START static video_util_error_e __video_util_error_convert(int error) { if (error == MM_ERROR_NONE) { @@ -220,7 +220,7 @@ static video_util_error_e __video_util_error_convert(int error) return VIDEO_UTIL_ERROR_INVALID_OPERATION; } } - +//LCOV_EXCL_STOP static void __video_util_transcode_progress_cb(unsigned long current_position, unsigned long duration, void *user_data) { video_util_s *_handle = (video_util_s *)user_data;