Make a gcov package 80/209280/2 accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix accepted/tizen/5.5/unified/20191031.025735 accepted/tizen/5.5/unified/mobile/hotfix/20201027.064142 accepted/tizen/5.5/unified/wearable/hotfix/20201027.120542 accepted/tizen/unified/20190711.062800 submit/tizen/20190704.085658 submit/tizen_5.5/20191031.000002 submit/tizen_5.5_mobile_hotfix/20201026.185102 submit/tizen_5.5_wearable_hotfix/20201026.184302 tizen_5.5.m2_release
authorGilbok Lee <gilbok.lee@samsung.com>
Tue, 2 Jul 2019 02:36:23 +0000 (11:36 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Thu, 4 Jul 2019 08:44:25 +0000 (17:44 +0900)
- make a gcov package for measuring coverage

[Version] 0.1.13

Change-Id: I745db2d8169d519aec89c87712f31d63d6a00ecd

packaging/capi-media-video-util.spec

index b192626..b2ce1be 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-video-util
 Summary:    A Video Utility library in Tizen Native API
-Version:    0.1.12
+Version:    0.1.13
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
@@ -18,7 +18,6 @@ BuildRequires:  gettext-devel
 %description
 A Video Utility library in Tizen Native API
 
-
 %package devel
 Summary:    A Video Utility library in Tizen Native API (Developement)
 Group:      TO_BE_FILLED
@@ -31,6 +30,15 @@ Requires:  pkgconfig(capi-base-common)
 %description devel
 A Video Utility library in Tizen Native API (Developement)
 
+%if 0%{?gcov:1}
+%package gcov
+Summary: Line Coverage of Video Utility library in Tizen C API
+Group: Development/Multimedia
+
+%description gcov
+Collection of files related to Line Coverage. It is tested as gcov for a video utility library in Tizen native API
+%endif
+
 %prep
 %setup -q
 cp %{SOURCE1001} .
@@ -46,11 +54,19 @@ export LDFLAGS+=" -lgcov"
 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
 %cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
 make %{?jobs:-j%jobs}
+%if 0%{?gcov:1}
+mkdir -p gcov-obj
+find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
+%endif
 
 %install
 %make_install
 mkdir -p %{buildroot}%{_bindir}
 cp test/video_util_test %{buildroot}%{_bindir}
+%if 0%{?gcov:1}
+mkdir -p %{buildroot}%{_datadir}/gcov/obj
+install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
+%endif
 
 %post
 
@@ -68,3 +84,7 @@ cp test/video_util_test %{buildroot}%{_bindir}
 %{_libdir}/pkgconfig/*.pc
 %{_includedir}/media/*.h
 
+%if 0%{?gcov:1}
+%files gcov
+%{_datadir}/gcov/obj/*
+%endif