Add initial source codes for gtest
[platform/core/connectivity/stc-manager.git] / packaging / stc-manager.spec
index bd37172..ea01601 100644 (file)
@@ -1,6 +1,6 @@
 Name:       stc-manager
 Summary:    STC(Smart Traffic Control) manager
-Version:    0.0.42
+Version:    0.0.43
 Release:    0
 Group:      Network & Connectivity/Other
 License:    Apache-2.0
@@ -30,6 +30,10 @@ BuildRequires:       pkgconfig(sqlite3)
 BuildRequires:  python
 BuildRequires:  python-xml
 
+%if 0%{?gtests:1}
+BuildRequires: pkgconfig(gmock)
+%endif
+
 %description
 A smart traffic control manager to manage traffic counting and bandwidth limitation
 
@@ -57,7 +61,9 @@ export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
        -DENABLE_DATABASE=%{enable_database} \
        -DDATABASE_FULL_PATH=%{database_full_path} \
        -DENABLE_STATISTICS=%{enable_statistics} \
-       -DENABLE_RESTRICTION=%{enable_restriction}
+       -DENABLE_RESTRICTION=%{enable_restriction} \
+       -DBUILD_GTESTS=%{?gtests:1}%{!?gtests:0} \
+       -DBUILD_GCOV=%{?gcov:1}%{!?gcov:0}
 
 make %{?_smp_mflags}
 
@@ -108,6 +114,10 @@ cp resources/dbus/stc-manager.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/st
 %config(noreplace) %attr(660, root, root) %{database_full_path}-journal
 %endif
 
+%if 0%{?gtests:1}
+%{_bindir}/gtest*
+%endif
+
 %files plugin
 %manifest %{name}.manifest
 %attr(644, -,-) %{_datadir}/icons/*.png