From: Hwankyu Jhun Date: Fri, 23 Apr 2021 00:35:38 +0000 (+0900) Subject: Fix gcov build error X-Git-Tag: submit/tizen/20210423.011914~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=245e43ce09b959b62e05e6855f6e7602e2cc10eb;p=platform%2Fcore%2Fapi%2Fpreference.git Fix gcov build error Change-Id: Ic27aab48f458144b21ddbde0fa7cad1ce9bf778a Signed-off-by: Hwankyu Jhun --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d194f4..5c6cb94 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,9 @@ SET(TARGET_TOOL "preference_tool") ENABLE_TESTING() SET(TARGET_UNIT_TESTS "preference-unit-tests") +ADD_TEST(NAME ${TARGET_UNIT_TESTS} + COMMAND ${TARGET_UNIT_TESTS} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/unittests) INCLUDE(FindPkgConfig) INCLUDE(ApplyPkgConfig) diff --git a/packaging/capi-appfw-preference.spec b/packaging/capi-appfw-preference.spec index adad1ff..91fc311 100644 --- a/packaging/capi-appfw-preference.spec +++ b/packaging/capi-appfw-preference.spec @@ -71,10 +71,9 @@ install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj %endif %check -cd unittests LD_LIBRARY_PATH=../preference ctest -V %if 0%{?gcov:1} -cd ../src +cd preference lcov -c --ignore-errors graph --no-external -d . -o preference.info genhtml preference.info -o preference.out zip -r preference.zip preference.out