Fix build error on gcov option 39/257339/2
authorJihoon Kim <jihoon48.kim@samsung.com>
Fri, 23 Apr 2021 01:59:00 +0000 (10:59 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Fri, 23 Apr 2021 02:08:03 +0000 (11:08 +0900)
Change-Id: I5ec5db55b92a2e6c3fb8e699f0bd7108a4c44066
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
CMakeLists.txt
packaging/capi-ui-sticker.spec

index 7da1298..4279bb2 100755 (executable)
@@ -53,9 +53,7 @@ ADD_SUBDIRECTORY(receiver)
 ENDIF()
 
 ## Test
-IF("${TEST_ENABLE}" STREQUAL "true")
 ENABLE_TESTING()
-ENDIF()
 SET(UTC_STICKER sticker_unittests)
 ADD_TEST(NAME ${UTC_STICKER} COMMAND ${UTC_STICKER}
                         WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests)
index 5bfc02c..125e876 100644 (file)
@@ -115,12 +115,7 @@ export FFLAGS+=" -DTIZEN_DEBUG_ENABLE -fvisibility=hidden"
 %endif
          -DCMAKE_INSTALL_PREFIX=/usr -DLIBDIR=%{_libdir} -DBINDIR=%{_bindir} -DINCLUDEDIR=%{_includedir} \
          -DTZ_SYS_RO_SHARE=%TZ_SYS_RO_SHARE -DTZ_SYS_BIN=%TZ_SYS_BIN -DTZ_USER_SHARE=%TZ_USER_SHARE \
-         -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES \
-%if %{defined _ctest_enable}
-    -DTEST_ENABLE="%{_ctest_enable}" \
-%else
-    -DTEST_ENABLE="false" \
-%endif
+         -DTZ_SYS_RO_APP=%TZ_SYS_RO_APP -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES
 
 make %{?jobs:-j%jobs}
 
@@ -158,13 +153,12 @@ tar xf %{name}-gcov.tar -C %{buildroot}%{_datadir}/gcov/obj
 %endif
 
 %check
-%if "%{_ctest_enable}" == "true"
-ctest --output-on-failure %{?_smp_mflags}
-%endif
-
 %if 0%{?gcov:1}
-lcov -c --ignore-errors graph --no-external -q -d . -o gcov.info
-genhtml gcov.info
+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
 
 %post