From 245e43ce09b959b62e05e6855f6e7602e2cc10eb Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Fri, 23 Apr 2021 09:35:38 +0900 Subject: [PATCH] Fix gcov build error Change-Id: Ic27aab48f458144b21ddbde0fa7cad1ce9bf778a Signed-off-by: Hwankyu Jhun --- CMakeLists.txt | 3 +++ packaging/capi-appfw-preference.spec | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) 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 -- 2.34.1