From: Jihoon Kim Date: Mon, 22 Jun 2020 02:35:59 +0000 (+0900) Subject: Enable to generate test package X-Git-Tag: submit/tizen/20200622.014257~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=043ebbf885473048719db8413d3eddbfef0b30ae;p=platform%2Fcore%2Fapi%2Finputmethod.git Enable to generate test package Change-Id: I827e9f254b8136c34f2a7aca76e4c867ce3bae13 Signed-off-by: Jihoon Kim --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a13e3b..b98c56a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -181,7 +181,6 @@ ADD_CUSTOM_COMMAND( ENDIF(UNIX) ## Test -IF(NOT "${TEST_TYPE}" STREQUAL "none") IF(NOT DEFINED MINIMUM_BUILD) ENABLE_TESTING() SET(UNITTEST_INPUTMETHOD inputmethod_unittests) @@ -190,4 +189,3 @@ ADD_TEST(NAME ${UNITTEST_INPUTMETHOD} COMMAND ${UNITTEST_INPUTMETHOD} ADD_SUBDIRECTORY(tests) ENDIF(NOT DEFINED MINIMUM_BUILD) -ENDIF() diff --git a/packaging/capi-ui-inputmethod.spec b/packaging/capi-ui-inputmethod.spec index 9dd7c19..7726c70 100644 --- a/packaging/capi-ui-inputmethod.spec +++ b/packaging/capi-ui-inputmethod.spec @@ -15,9 +15,7 @@ BuildRequires: pkgconfig(libscl-core) BuildRequires: pkgconfig(isf) BuildRequires: pkgconfig(cynara-client) BuildRequires: pkgconfig(cynara-session) -%if %{defined _test_type} BuildRequires: pkgconfig(gmock) -%endif Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig @@ -61,7 +59,6 @@ Group: Graphics & UI Framework/Input Input Method gcov objects %endif -%if %{defined _test_type} %package unittests Summary: inputmethod tests Group: Development/Libraries @@ -69,7 +66,6 @@ Requires: %{name} = %{version}-%{release} %description unittests GTest for inputmethod manager -%endif %prep %setup -q @@ -114,12 +110,14 @@ mkdir -p %{buildroot}%{_datadir}/gcov/obj install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj %endif +%if %{defined _test_type} %check ctest --output-on-failure %{?_smp_mflags} %if 0%{?gcov:1} lcov -c --ignore-errors graph --no-external -q -d . -o gcov.info genhtml gcov.info %endif +%endif %post -p /sbin/ldconfig @@ -151,7 +149,5 @@ genhtml gcov.info %{_datadir}/gcov/obj/* %endif -%if %{defined _test_type} %files unittests %{_bindir}/* -%endif