Add option to execute unittest in building package
[platform/core/uifw/capi-ui-sticker.git] / packaging / capi-ui-sticker.spec
index fe8f48b..86bd5c3 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-ui-sticker
 Summary:    Sticker client library and daemon
-Version:    1.2.8
+Version:    1.2.11
 Release:    1
 Group:      Graphics & UI Framework/Input
 License:    Apache-2.0
@@ -129,6 +129,8 @@ builddir=$(basename $PWD)
 gcno_obj_dir=%{buildroot}%{_datadir}/gcov/obj/%{name}/"$builddir"
 mkdir -p "$gcno_obj_dir"
 find ./server/ -name '*.gcno' -exec rm {} \;
+find ./tests/ -name '*.gcno' -not -path "*/client/*" -exec rm {} \;
+find . -name '*_dbus*.gcno' -exec rm {} \;
 find . -name '*.gcno' -exec cp --parents '{}' "$gcno_obj_dir" ';'
 %endif
 
@@ -181,12 +183,14 @@ install -m 0644 %SOURCE3 %{buildroot}%{_sysconfdir}/dbus-1/system.d/capi-ui-stic
 
 %check
 %if 0%{?gcov:1}
+%if 0%{?run_unittest:1}
 ctest --output-on-failure %{?_smp_mflags}
 lcov -c --ignore-errors graph --no-external -q -d . -o capi-ui-sticker.info
 genhtml capi-ui-sticker.info -o capi-ui-sticker.out
 zip -r capi-ui-sticker.zip capi-ui-sticker.out capi-ui-sticker.info
 install -m 0644 capi-ui-sticker.zip %{buildroot}%{_datadir}/gcov
 %endif
+%endif
 
 %post
 /sbin/ldconfig