From: Minje Ahn Date: Mon, 1 Jul 2019 23:16:36 +0000 (+0900) Subject: Add for line coverage X-Git-Tag: accepted/tizen/unified/20190702.234131~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=04c6d23f55cce70f42a97e96d8dae08ac845100a;p=platform%2Fcore%2Fapi%2Fmedia-controller.git Add for line coverage Change-Id: Iaeb8873f285a16ce1feade31350e40b74deddaae Signed-off-by: Minje Ahn --- diff --git a/include/media_controller_client.h b/include/media_controller_client.h index f7961ea..e139fef 100755 --- a/include/media_controller_client.h +++ b/include/media_controller_client.h @@ -124,7 +124,7 @@ typedef void (*mc_shuffle_mode_updated_cb)(const char *server_name, mc_shuffle_m * The @a server_name should not be released by the application. \n * The @a server_name can be used only in the callback. To use outside, make a copy. * - * @param[in] server_name The app_id of the media controller server which sent the notification.. + * @param[in] server_name The app_id of the media controller server which sent the notification. * @param[in] mode The repeat mode of the updated media controller server * @param[in] user_data The user data passed from the mc_client_set_repeat_mode_updated_cb() function * @@ -220,7 +220,7 @@ typedef bool (*mc_activated_server_cb)(const char *server_name, void *user_data) * The @a server_name and @ request_id should not be released by the application. \n * The @a server_name and @ request_id can be used only in the callback. To use outside, make a copy. * - * @param[in] server_name The app_id of the media controller server which sent the reply, + * @param[in] server_name The app_id of the media controller server which sent the reply * @param[in] request_id The id of the command request * @param[in] result_code The result code of the action * @param[in] data The extra data @@ -241,7 +241,7 @@ typedef void (*mc_cmd_reply_received_cb)(const char *server_name, const char *re * The @a server_name should not be released by the application. \n * The @a server_name can be used only in the callback. To use outside, make a copy. * - * @param[in] server_name The app_id of the subscribed media controller server.. + * @param[in] server_name The app_id of the subscribed media controller server * @param[in] user_data The user data passed from the mc_client_foreach_server_subscribed() function * * @return @c true to continue with the next iteration of the loop, diff --git a/packaging/capi-media-controller.spec b/packaging/capi-media-controller.spec index 32161bb..1765f6c 100644 --- a/packaging/capi-media-controller.spec +++ b/packaging/capi-media-controller.spec @@ -24,6 +24,10 @@ BuildRequires: pkgconfig(cynara-session) BuildRequires: pkgconfig(uuid) BuildRequires: pkgconfig(capi-appfw-app-control) BuildRequires: pkgconfig(vconf) +%if 0%{?gcov:1} +BuildRequires: lcov +BuildRequires: zip +%endif # socket activation enable(1), disable(0) %if "%{tizen_profile_name}" == "tv" @@ -49,7 +53,14 @@ Requires: %{name} = %{version}-%{release} %description devel This package provides a media controller library in Tizen Native API(Development files included) +%if 0%{?gcov:1} +%package gcov +Summary: Line Coverage of Media Controller library in Tizen C API +Group: Development/Multimedia +%description gcov +Collection of files related to Line Coverage. It is teseted as gcov for a media controller library in Tizen native API +%endif %prep %setup -q @@ -75,6 +86,11 @@ MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` %__make %{?jobs:-j%jobs} +%if 0%{?gcov:1} +mkdir -p gcov-obj +find . -name '*.gcno' -exec cp '{}' gcov-obj ';' +%endif + %install rm -rf %{buildroot} %make_install @@ -97,6 +113,20 @@ install -m 644 %{SOURCE3} %{buildroot}%{_unitdir}/mediacontroller.service ln -s ../mediacontroller.service %{buildroot}%{_unitdir}/multi-user.target.wants/mediacontroller.service %endif +%if 0%{?gcov:1} +mkdir -p %{buildroot}%{_datadir}/gcov/obj +install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj +%endif + +%check +ctest --output-on-failure %{?_smp_mflags} +%if 0%{?gcov:1} +lcov -c --ignore-errors graph --no-external -q -d . -o media-controller.info +genhtml media-controller.info -o media-controller.out +zip -r media-controller.zip media-controller.out media-controller.info +install -m 0644 media-controller.zip %{buildroot}%{_datadir}/gcov/ +%endif + %post %postun @@ -123,4 +153,9 @@ ln -s ../mediacontroller.service %{buildroot}%{_unitdir}/multi-user.target.wants %files devel %{_libdir}/*.so %{_includedir}/media/*.h -%{_libdir}/pkgconfig/capi-media-controller.pc +%{_libdir}/pkgconfig/capi-media-controller.pci + +%if 0%{?gcov:1} +%files gcov +%{_datadir}/gcov/obj/* +%endif