Apply gcov ON build 62/238262/2
authormk5004.lee <mk5004.lee@samsung.com>
Fri, 10 Jul 2020 05:36:09 +0000 (14:36 +0900)
committermk5004.lee <mk5004.lee@samsung.com>
Fri, 10 Jul 2020 06:00:42 +0000 (15:00 +0900)
Change-Id: Iec33ef377ddf51302db5fc53f18ea64aabf20741
Signed-off-by: mk5004.lee <mk5004.lee@samsung.com>
19 files changed:
packaging/notification.spec
unittest/CMakeLists.txt
unittest/src/test_main.cc
unittest/src/test_noti_ex_abstract_item.cc [moved from unittest/src/test_abstract_item.cc with 100% similarity]
unittest/src/test_noti_ex_app_control_action.cc [moved from unittest/src/test_app_control_action.cc with 100% similarity]
unittest/src/test_noti_ex_button_item.cc [moved from unittest/src/test_button_item.cc with 100% similarity]
unittest/src/test_noti_ex_chat_message_item.cc [moved from unittest/src/test_chat_message_item.cc with 100% similarity]
unittest/src/test_noti_ex_checkbox_item.cc [moved from unittest/src/test_checkbox_item.cc with 100% similarity]
unittest/src/test_noti_ex_entry_item.cc [moved from unittest/src/test_entry_item.cc with 100% similarity]
unittest/src/test_noti_ex_event_info.cc [moved from unittest/src/test_event_info.cc with 100% similarity]
unittest/src/test_noti_ex_group_item.cc [moved from unittest/src/test_group_item.cc with 100% similarity, mode: 0644]
unittest/src/test_noti_ex_icon_item.cc [moved from unittest/src/test_icon_item.cc with 100% similarity]
unittest/src/test_noti_ex_image_item.cc [moved from unittest/src/test_image_item.cc with 100% similarity]
unittest/src/test_noti_ex_input_selector_item.cc [moved from unittest/src/test_input_selector_item.cc with 100% similarity]
unittest/src/test_noti_ex_progress_item.cc [moved from unittest/src/test_progress_item.cc with 100% similarity]
unittest/src/test_noti_ex_shared_file.cc [moved from unittest/src/test_shared_file.cc with 100% similarity, mode: 0644]
unittest/src/test_noti_ex_text_item.cc [moved from unittest/src/test_text_item.cc with 100% similarity]
unittest/src/test_noti_ex_time_item.cc [moved from unittest/src/test_time_item.cc with 100% similarity]
unittest/src/test_noti_ex_visibility_action.cc [moved from unittest/src/test_visibility_action.cc with 100% similarity]

index e2f4b09..c385c48 100644 (file)
@@ -24,6 +24,11 @@ BuildRequires: pkgconfig(libsmack)
 BuildRequires: pkgconfig(gmock)
 BuildRequires: pkgconfig(uuid)
 
+%if 0%{?gcov:1}
+BuildRequires:  lcov
+BuildRequires:  zip
+%endif
+
 BuildRequires: cmake
 Requires(post): /sbin/ldconfig
 Requires(post): %{TZ_SYS_BIN}/sqlite3
@@ -75,6 +80,12 @@ find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
 
 %check
 ctest --output-on-failure %{?_smp_mflags}
+%if 0%{?gcov:1}
+lcov -c --ignore-errors graph --no-external -q -d . -o notification-ex.info
+genhtml notification-ex.info -o notification-ex.out
+zip -r notification-ex.zip notification-ex.out
+install -m 0644 notification-ex.zip %{buildroot}%{_datadir}/gcov/notification-ex.zip
+%endif
 
 %install
 rm -rf %{buildroot}
@@ -135,8 +146,6 @@ fi
 %{_libdir}/pkgconfig/notification.pc
 %{_libdir}/libnotification.so
 
-
-
 #################################################
 # notification-ex
 #################################################
@@ -171,7 +180,6 @@ Header & package configuration files to support development of the notification.
 %{_libdir}/pkgconfig/notification-ex.pc
 %attr(0644,root,root) %{_libdir}/libnotification-ex.so
 
-
 #################################################
 # notification-ex_unittests
 #################################################
@@ -187,5 +195,5 @@ GTest for notification-ex
 
 %if 0%{?gcov:1}
 %files gcov
-%{_datadir}/gcov/obj/*
+%{_datadir}/gcov/*
 %endif
index 93823e7..afbc3ba 100644 (file)
@@ -22,15 +22,15 @@ SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
 SET(CMAKE_CXX_FLAGS_RELEASE "-O2")
 
 INCLUDE_DIRECTORIES(
-    ${CMAKE_CURRENT_SOURCE_DIR}/../notification-ex
-    ${CMAKE_CURRENT_SOURCE_DIR}/../notification-ex/api
-    ${CMAKE_CURRENT_SOURCE_DIR}/../mock
-    ${CMAKE_CURRENT_SOURCE_DIR}/../
+    ${CMAKE_SOURCE_DIR}/notification-ex
+    ${CMAKE_SOURCE_DIR}/notification-ex/api
+    ${CMAKE_SOURCE_DIR}/mock
+    ${CMAKE_SOURCE_DIR}/
 )
 
 AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/src SOURCES)
-AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../mock MOCK_SOURCES)
-AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../notification-ex NOTIFICATION_EX_SOURCES)
+AUX_SOURCE_DIRECTORY(${CMAKE_SOURCE_DIR}/mock MOCK_SOURCES)
+AUX_SOURCE_DIRECTORY(${CMAKE_SOURCE_DIR}/notification-ex NOTIFICATION_EX_SOURCES)
 ADD_EXECUTABLE(${PROJECT_NAME}
     ${SOURCES}
     ${NOTIFICATION_EX_SOURCES}
index 4be05dc..ad7ec6c 100644 (file)
@@ -17,9 +17,9 @@
 #include <gtest/gtest.h>
 #include <gmock/gmock.h>
 
-int main(int argc, char** argv){
+int main(int argc, char** argv) {
   int ret = -1;
-  setenv("GCOV_PREFIX", "/tmp/", 1);
+
   try {
     testing::InitGoogleTest(&argc, argv);
   } catch(...) {
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from unittest/src/test_group_item.cc
rename to unittest/src/test_noti_ex_group_item.cc
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from unittest/src/test_shared_file.cc
rename to unittest/src/test_noti_ex_shared_file.cc