From 0acc9d92bbf836e506f7715367247eb6036ebbda Mon Sep 17 00:00:00 2001 From: DoHyun Pyun Date: Mon, 8 Jul 2019 10:11:00 +0900 Subject: [PATCH] Make a gcov package for coverage Change-Id: I55ce079d84375055d90c48fef97411cfe3448bf4 Signed-off-by: DoHyun Pyun --- packaging/capi-network-bluetooth.spec | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/packaging/capi-network-bluetooth.spec b/packaging/capi-network-bluetooth.spec index 867676e..0052c35 100644 --- a/packaging/capi-network-bluetooth.spec +++ b/packaging/capi-network-bluetooth.spec @@ -18,6 +18,9 @@ BuildRequires: pkgconfig(capi-appfw-app-control) BuildRequires: pkgconfig(capi-base-common) BuildRequires: pkgconfig(capi-system-info) BuildRequires: cmake +%if 0%{?gcov:1} +BuildRequires: lcov +%endif %description Network Bluetooth Framework @@ -40,6 +43,15 @@ Requires: %{name} = %{version}-%{release} %description test This package is C-API test application. + +%if 0%{?gcov:1} +%package gcov +Summary: Network Bluetooth Framework library(gcov) +Group: Connectivit/Testing +%description gcov +gcov objects for coverage test +%endif + %prep %setup -q cp %{SOURCE1001} %{SOURCE1002} . @@ -81,10 +93,20 @@ 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 +%if 0%{?gcov:1} +mkdir -p %{buildroot}%{_datadir}/gcov/obj +install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj +%endif + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -112,3 +134,7 @@ rm -rf %{buildroot} %{_libdir}/pkgconfig/capi-network-bluetooth.pc %{_libdir}/libcapi-network-bluetooth.so +%if 0%{?gcov:1} +%files gcov +%{_datadir}/gcov/obj/* +%endif \ No newline at end of file -- 2.7.4