execute enlightenment_info -gcov to check enlightenment line coverage 43/243943/2
authorJunkyeong Kim <jk0430.kim@samsung.com>
Fri, 11 Sep 2020 09:30:55 +0000 (18:30 +0900)
committerJunkyeong Kim <jk0430.kim@samsung.com>
Fri, 11 Sep 2020 09:35:13 +0000 (18:35 +0900)
change USE_GCOV to '1' in spec file.

Change-Id: I7df7358610e80e6b23fc1be68d97a10838045536
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
packaging/e-tizen-unittests.spec
src/e_test_main.cpp

index 7d6a121..7ef09ff 100644 (file)
@@ -1,3 +1,5 @@
+%define USE_GCOV 0
+
 Name: e-tizen-unittests
 Version: 0.5.5
 Release: 1
@@ -31,6 +33,9 @@ cp %{SOURCE1001} .
 export GC_SECTIONS_FLAGS="-fdata-sections -ffunction-sections -Wl,--gc-sections"
 export CXXFLAGS+=" -Wall -g -fPIC -rdynamic ${GC_SECTIONS_FLAGS} -DEFL_BETA_API_SUPPORT "
 export LDFLAGS+=" -Wl,--hash-style=both -Wl,--as-needed -Wl,--rpath=/usr/lib"
+%if "%{USE_GCOV}" == "1"
+export CXXFLAGS+=" -DTIZEN_TEST_GCOV "
+%endif
 
 %autogen
 %configure --prefix=/usr
index 5427136..ced5690 100644 (file)
@@ -26,6 +26,11 @@ elm_main(int argc, char **argv)
    ::testing::InitGoogleTest(&argc, argv);
    ret = RUN_ALL_TESTS();
 
+#ifdef TIZEN_TEST_GCOV
+   if (std::system("enlightenment_info -gcov 1") == 0)
+     printf("failed to enlightenment gcov execution\n");
+#endif
+
    // display unlock
    etRunner::get().setDevctlDisplayLock(EINA_FALSE);