From d9ccd4cc0e10c63e7f1e7c61d457fc7f0b78251c Mon Sep 17 00:00:00 2001 From: DoHyun Pyun Date: Mon, 13 Apr 2020 11:24:27 +0900 Subject: [PATCH] Modify the package configuration for coverage Change-Id: I3564e4abfef61c6d4893560720084eb95ab4ec9d Signed-off-by: DoHyun Pyun --- packaging/bluetooth-agent.spec | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/packaging/bluetooth-agent.spec b/packaging/bluetooth-agent.spec index 6e57d59..a1cf824 100644 --- a/packaging/bluetooth-agent.spec +++ b/packaging/bluetooth-agent.spec @@ -47,6 +47,7 @@ BuildRequires: cmake Requires: security-config %if 0%{?gcov:1} BuildRequires: pkgconfig(gmock) +BuildRequires: lcov %endif #Requires: %{name}-compat = %{version}-%{release} @@ -98,12 +99,12 @@ Group: Network & Connectivity/Bluetooth Bluetooth agent binary compiled for IPSP(Internet Protocol Support Profile) %if 0%{?gcov:1} -%package test +%package gcov Summary: Test package for bluetooth-agent Group: TO_BE/FILLED Requires: %{name} = %{version}-%{release} -%description test +%description gcov This package is C-API test application. %endif @@ -148,10 +149,20 @@ export LDFLAGS+=" -lgcov" make VERBOSE=1 +%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 + # This usage of profile macro does NOT conflict 4.0 configurability. #%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" # Original: wearable, ivi. Added: common, "undefined" @@ -226,8 +237,9 @@ install -D -m 0644 packaging/bluetooth-hid-agent.service %{buildroot}%{_libdir}/ %{_sysconfdir}/dbus-1/system.d/bluetooth-ipsp-agent.conf %if 0%{?gcov:1} -%files test +%files gcov %manifest %{name}.manifest %{_bindir}/gtest-bluetooth-agent %{_libdir}/lib* +%{_datadir}/gcov/obj/* %endif -- 2.7.4