From a81b00b30707820c9f3d1e1fb59268409958469b Mon Sep 17 00:00:00 2001 From: "sooyeon.kim" Date: Tue, 1 Sep 2020 14:37:29 +0900 Subject: [PATCH] Add line coverage options Change-Id: I658f93c800d2823f4e83a8c84ee220baeb04324e Signed-off-by: sooyeon.kim --- client/gesture.c | 12 ++++++------ packaging/capi-ui-gesture.spec | 10 ++++++++++ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/client/gesture.c b/client/gesture.c index f333dea..84d291d 100644 --- a/client/gesture.c +++ b/client/gesture.c @@ -213,7 +213,7 @@ EXPORT_API int hand_gesture_is_supported_type(hand_gesture_h handle, hand_gestur return HAND_GESTURE_ERROR_NONE; } - +//LCOV_EXCL_START EXPORT_API int hand_gesture_set_handtype(hand_gesture_h handle, hand_gesture_handtype_e hand_type) { LOGD("hand_gesture_set_handtype"); @@ -249,7 +249,7 @@ EXPORT_API int hand_gesture_set_workmode(hand_gesture_h handle, hand_gesture_wor return ret; } - +//LCOV_EXCL_STOP EXPORT_API int hand_gesture_set_option(hand_gesture_h handle, hand_gesture_option_e option) { LOGD("hand_gesture_set_option"); @@ -267,7 +267,7 @@ EXPORT_API int hand_gesture_set_option(hand_gesture_h handle, hand_gesture_optio return ret; } - +//LCOV_EXCL_START EXPORT_API int hand_gesture_set_sensitivity(hand_gesture_h handle, int sensitivity) { LOGD("hand_gesture_set_sensitivity"); @@ -285,7 +285,7 @@ EXPORT_API int hand_gesture_set_sensitivity(hand_gesture_h handle, int sensitivi return ret; } - +//LCOV_EXCL_STOP EXPORT_API int hand_gesture_start_recognition(hand_gesture_h handle, hand_gesture_type_e gesture_type, hand_gesture_recognition_cb callback, void *user_data) { LOGD("hand_gesture_start_recognition"); @@ -338,7 +338,7 @@ EXPORT_API int hand_gesture_stop_recognition(hand_gesture_h handle) return HAND_GESTURE_ERROR_NONE; } - +//LCOV_EXCL_START EXPORT_API int hand_gesture_get_event(const hand_gesture_data_h data, hand_gesture_event_e *event) { CHECK_GESTURE_FEATURE(); @@ -349,7 +349,7 @@ EXPORT_API int hand_gesture_get_event(const hand_gesture_data_h data, hand_gestu return HAND_GESTURE_ERROR_NONE; } - +//LCOV_EXCL_STOP EXPORT_API int hand_gesture_get_engine_info(hand_gesture_h handle, char** engine_app_id, char** engine_name) { LOGD("[engineInfo] hand_gesture_get_engine_info"); diff --git a/packaging/capi-ui-gesture.spec b/packaging/capi-ui-gesture.spec index 7fb84c2..7aa6b55 100644 --- a/packaging/capi-ui-gesture.spec +++ b/packaging/capi-ui-gesture.spec @@ -28,6 +28,11 @@ Requires(post): /sbin/ldconfig Requires(post): dbus Requires(postun): /sbin/ldconfig +%if 0%{?gcov:1} +BuildRequires: lcov +BuildRequires: zip +%endif + %description Gesture client library and daemon @@ -91,6 +96,11 @@ mkdir -p %{buildroot}%{_datadir}/gcov/obj install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj %endif +#%if 0%{?gcov:1} +#lcov -c --ignore-errors graph --no-external -q -d . -o gcov.info +#genhtml gcov.info +#%endif + mkdir -p %{buildroot}/etc/dbus-1/system.d/ cp %{SOURCE3} %{buildroot}/etc/dbus-1/system.d/capi-ui-gesture.conf -- 2.7.4