summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJihoon Jung <jh8801.jung@samsung.com>2020-04-27 15:40:47 +0900
committerJihoon Jung <jh8801.jung@samsung.com>2020-04-27 15:41:15 +0900
commit778f42b48915ba82829c12f5be19554151ba297a (patch)
tree8fb46867963150ad21887cd74ded4f97c5217aa9
parentf933b6f3006737a903b64d41898e776b923f1d6a (diff)
downloadsmartcard-plugin-uicc-778f42b48915ba82829c12f5be19554151ba297a.tar.gz
smartcard-plugin-uicc-778f42b48915ba82829c12f5be19554151ba297a.tar.bz2
smartcard-plugin-uicc-778f42b48915ba82829c12f5be19554151ba297a.zip
Add some definitions for gcov
Change-Id: I6a2dbe87ee89d95c9409dd4f00e5a01213942bda Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
-rwxr-xr-xUICCTerminal.cpp6
-rwxr-xr-xpackaging/smartcard-plugin-uicc.spec30
2 files changed, 36 insertions, 0 deletions
diff --git a/UICCTerminal.cpp b/UICCTerminal.cpp
index 91c7f55..2644417 100755
--- a/UICCTerminal.cpp
+++ b/UICCTerminal.cpp
@@ -85,6 +85,7 @@ extern "C" EXPORT_API void destroy_instance(void *instance)
}
}
+/* LCOV_EXCL_START */
static void _uiccTransmitCallback(TapiHandle *handle, int result,
void *data, void *user_data)
{
@@ -162,6 +163,7 @@ static void _uiccCallback_sync(TapiHandle *handle, int result,
g_main_loop_quit(context->loop);
g_main_loop_unref(context->loop);
}
+/* LCOV_EXCL_STOP */
namespace smartcard_service_api
{
@@ -337,6 +339,7 @@ namespace smartcard_service_api
return result;
}
+ /* LCOV_EXCL_START */
int UICCTerminal::transmit(const ByteArray &command,
terminalTransmitCallback callback, void *userParam)
{
@@ -414,6 +417,7 @@ namespace smartcard_service_api
return result;
}
+ /* LCOV_EXCL_STOP */
bool UICCTerminal::isSecureElementPresence() const
{
@@ -446,6 +450,7 @@ namespace smartcard_service_api
return result;
}
+ /* LCOV_EXCL_START */
void UICCTerminal::uiccStatusNotiCallback(TapiHandle *handle,
const char *noti_id, void *data, void *user_data)
{
@@ -479,4 +484,5 @@ namespace smartcard_service_api
break;
}
}
+ /* LCOV_EXCL_STOP */
} /* namespace smartcard_service_api */
diff --git a/packaging/smartcard-plugin-uicc.spec b/packaging/smartcard-plugin-uicc.spec
index 4a40a97..09ee94b 100755
--- a/packaging/smartcard-plugin-uicc.spec
+++ b/packaging/smartcard-plugin-uicc.spec
@@ -31,8 +31,22 @@ Requires: %{name} = %{version}-%{release}
%description devel
smartcard service.
+%if 0%{?gcov:1}
+%package gcov
+Summary: A smartcard-plugin-uicc gcov Tool
+Group: Network & Connectivity/Development
+
+%description gcov
+A smartcard-plugin-uicc gcov objects
+%endif
%build
+%if 0%{?gcov:1}
+export CFLAGS="-fprofile-arcs -ftest-coverage"
+export CXXFLAGS="-fprofile-arcs -ftest-coverage"
+export LDFLAGS=" -lgcov"
+%endif
+
%if 0%{?sec_build_binary_debug_enable}
export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
@@ -44,14 +58,24 @@ cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} \
%ifarch aarch64 x86_64
-DTIZEN_ARCH_64=1 \
%endif
+ -DBUILD_GCOV=%{?gcov:1}%{!?gcov:0}
#make %{?jobs:-j%jobs}
+%if 0%{?gcov:1}
+mkdir -p gcov-obj
+find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
+%endif
%install
cd obj-arm-limux-qnueabi
%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
@@ -66,3 +90,9 @@ cd obj-arm-limux-qnueabi
%license LICENSE.APLv2
%defattr(-,root,root,-)
%{_libdir}/se/lib*.so
+
+%if 0%{?gcov:1}
+%files gcov
+%{_datadir}/gcov/obj/*
+%endif
+