Make a gcov package 83/209283/2 accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix accepted/tizen_6.0_unified_hotfix tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix tizen_6.0_hotfix accepted/tizen/5.5/unified/20191031.031304 accepted/tizen/5.5/unified/mobile/hotfix/20201027.065720 accepted/tizen/5.5/unified/wearable/hotfix/20201027.121606 accepted/tizen/6.0/unified/20201030.122448 accepted/tizen/6.0/unified/hotfix/20201103.004747 accepted/tizen/6.0/unified/hotfix/20201103.052034 accepted/tizen/unified/20190711.062814 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 submit/tizen_6.0/20201029.205102 submit/tizen_6.0_hotfix/20201102.192502 submit/tizen_6.0_hotfix/20201103.114802 tizen_5.5.m2_release tizen_6.0.m2_release
authorGilbok Lee <gilbok.lee@samsung.com>
Thu, 4 Jul 2019 08:37:52 +0000 (17:37 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Thu, 4 Jul 2019 08:43:59 +0000 (17:43 +0900)
- make a gcov package for measuring coverage

[Version] 0.1.15

Change-Id: Ia50dcf13f43567ba1c8e08efb78b067eb2f223e0

packaging/capi-media-radio.spec

index b351ee0..522a544 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-radio
 Summary:    A Radio library in Tizen Native API
-Version:    0.1.14
+Version:    0.1.15
 Release:    1
 Group:      API/C API
 License:    Apache-2.0
@@ -16,7 +16,6 @@ BuildRequires:  cmake
 %description
 A Radio library in Tizen Native API.
 
-
 %package devel
 Summary:    A Radio library in Tizen Native API (Development)
 Group:      Development/API
@@ -25,6 +24,15 @@ Requires:   %{name} = %{version}-%{release}
 %description devel
 A Radio library in Tizen Native API (Development).
 
+%if 0%{?gcov:1}
+%package gcov
+Summary: Line Coverage of Radio library in Tizen C API
+Group: Development/Multimedia
+
+%description gcov
+Collection of files related to Line Coverage. It is tested as gcov for a radio library in Tizen native API
+%endif
+
 %prep
 %setup -q
 cp %{SOURCE1001} .
@@ -40,13 +48,20 @@ 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
 rm -rf %{buildroot}
 %make_install
 mkdir -p %{buildroot}%{_bindir}
 cp test/radio_test %{buildroot}%{_bindir}
-
+%if 0%{?gcov:1}
+mkdir -p %{buildroot}%{_datadir}/gcov/obj
+install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
+%endif
 
 %post -p /sbin/ldconfig
 
@@ -65,3 +80,8 @@ cp test/radio_test %{buildroot}%{_bindir}
 /usr/include/media/radio.h
 %{_libdir}/pkgconfig/capi-media-radio.pc
 %{_libdir}/libcapi-media-radio.so
+
+%if 0%{?gcov:1}
+%files gcov
+%{_datadir}/gcov/obj/*
+%endif