projects
/
platform
/
core
/
api
/
tethering.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add gtest for line coverage
[platform/core/api/tethering.git]
/
packaging
/
capi-network-tethering.spec
diff --git
a/packaging/capi-network-tethering.spec
b/packaging/capi-network-tethering.spec
index
9d03489
..
bb579ab
100644
(file)
--- a/
packaging/capi-network-tethering.spec
+++ b/
packaging/capi-network-tethering.spec
@@
-14,9
+14,11
@@
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(key-manager)
BuildRequires: pkgconfig(capi-system-info)
BuildRequires: pkgconfig(libtzplatform-config)
BuildRequires: pkgconfig(key-manager)
BuildRequires: pkgconfig(capi-system-info)
BuildRequires: pkgconfig(libtzplatform-config)
+BuildRequires: pkgconfig(gmock)
BuildRequires: cmake
%if 0%{?gcov:1}
BuildRequires: lcov
BuildRequires: cmake
%if 0%{?gcov:1}
BuildRequires: lcov
+BuildRequires: tar
%endif
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
%endif
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
@@
-60,17
+62,21
@@
export LDFLAGS+=" -lgcov"
make %{?_smp_mflags}
make %{?_smp_mflags}
+%install
+%make_install
+
%if 0%{?gcov:1}
%if 0%{?gcov:1}
-mkdir -p gcov-obj
-find . -name '*.gcno' ! -iname "*client*" ! -name "*test*" -exec cp '{}' gcov-obj ';'
+find .. -name '*.gcno' | tar cf %{name}-gcov.tar -T -
+install -d -m 755 %{buildroot}%{_datadir}/gcov/obj
+tar xf %{name}-gcov.tar -C %{buildroot}%{_datadir}/gcov/obj
%endif
%endif
-%
install
-%make_install
-%make_install
+%
check
+tests/tethering-gtest
+
%if 0%{?gcov:1}
%if 0%{?gcov:1}
-mkdir -p %{buildroot}%{_datadir}/gcov/obj
-install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
+lcov -c --ignore-errors graph --no-external -b . -d . -o %{name}.info
+genhtml %{name}.info -o out --legend --show-details
%endif
%post -p /sbin/ldconfig
%endif
%post -p /sbin/ldconfig