Add coverage exception macros 31/219331/3
authorGilbok Lee <gilbok.lee@samsung.com>
Wed, 4 Dec 2019 09:24:37 +0000 (18:24 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Fri, 6 Dec 2019 06:10:51 +0000 (15:10 +0900)
[Version] 0.1.14
[Issue Type] Line coverage

Change-Id: Icc7b5ccdd81ca2ea9006d92df5267c9adc9dad51

include/video_util_private.h
packaging/capi-media-video-util.spec
src/video_util.c

index 31b1c67..28efd01 100644 (file)
 
 #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)
                        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);
 
index b2ce1be..a3a6974 100644 (file)
@@ -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
 
index fccfd68..07d6676 100644 (file)
@@ -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;