Make a gcov package for coverage 54/209554/1 accepted/tizen_5.5_unified_mobile_hotfix tizen_5.5_mobile_hotfix accepted/tizen/5.5/unified/20191031.024012 accepted/tizen/5.5/unified/mobile/hotfix/20201027.083930 accepted/tizen/unified/20190709.071139 submit/tizen/20190708.235457 submit/tizen_5.5/20191031.000003 submit/tizen_5.5_mobile_hotfix/20201026.185103 tizen_5.5.m2_release
authorDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 8 Jul 2019 23:54:09 +0000 (08:54 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 8 Jul 2019 23:54:09 +0000 (08:54 +0900)
Change-Id: Idde24bb0a1b622f0963f599822e6651ad591cc06
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
packaging/iotcon.spec

index 9dfb0d6..5ad1376 100644 (file)
@@ -15,6 +15,10 @@ BuildRequires:  pkgconfig(vconf)
 BuildRequires:  pkgconfig(iotivity)
 BuildRequires:  pkgconfig(uuid)
 BuildRequires:  pkgconfig(cynara-client)
+%if 0%{?gcov:1}
+BuildRequires: lcov
+%endif
+
 Requires(post): /usr/bin/chgrp, /usr/bin/chmod, /usr/bin/chsmack
 
 
@@ -39,6 +43,13 @@ Requires:   %{name} = %{version}
 %description test
 Tizen IoT Connectivity Test Programs
 
+%if 0%{?gcov:1}
+%package gcov
+Summary:  TizenIoT Connectivity library(gcov)
+Group:    Connectivit/Testing
+%description gcov
+gcov objects for coverage test
+%endif
 
 %prep
 %setup -q
@@ -65,11 +76,21 @@ MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
        -DPRODUCT_TV=%{PRODUCT_TV} \
        -DBUILD_GCOV=%{?gcov:1}%{!?gcov:0}
 
+%if 0%{?gcov:1}
+make %{?jobs:-j%jobs}
+
+mkdir -p gcov-obj
+find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
+%endif
 
 %install
 rm -rf %{buildroot}
 %make_install
 
+%if 0%{?gcov:1}
+mkdir -p %{buildroot}%{_datadir}/gcov/obj
+install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
+%endif
 
 %post
 /sbin/ldconfig
@@ -97,3 +118,7 @@ rm -rf %{buildroot}
 %{_bindir}/iotcon-test-*
 %license LICENSE.APLv2
 
+%if 0%{?gcov:1}
+%files gcov
+%{_datadir}/gcov/obj/*
+%endif