From f48ec7df046d3d540c542c190eead9e2c25f38fb Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Thu, 10 Sep 2020 17:04:26 +0800 Subject: [PATCH] Add tests sub package --- ibus-hangul.spec | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/ibus-hangul.spec b/ibus-hangul.spec index 2a5bb69..3e1da51 100644 --- a/ibus-hangul.spec +++ b/ibus-hangul.spec @@ -3,7 +3,7 @@ Name: ibus-hangul Version: 1.5.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The Hangul engine for IBus input platform License: GPLv2+ URL: https://github.com/libhangul/ibus-hangul @@ -32,6 +32,14 @@ Requires: python3 The Hangul engine for IBus platform. It provides Korean input method from libhangul. +%package tests +Summary: Tests for the %{name} package +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description tests +The %{name}-tests package contains tests that can be used to verify +the functionality of the installed %{name} package. + %prep %setup -q %patch1 -p1 -b .setup-abspath @@ -42,6 +50,7 @@ libhangul. --disable-static \ --with-python=python3 \ %{?_with_hotkeys} \ + --enable-installed-tests \ %{nil} make %{?_smp_mflags} @@ -58,6 +67,11 @@ desktop-file-validate ${RPM_BUILD_ROOT}%{_datadir}/applications/ibus-setup-hangu %find_lang %{name} +%check +make check \ + DISABLE_GUI_TESTS="ibus-hangul" \ + VERBOSE=1 + %post [ -x %{_bindir}/ibus ] && \ %{_bindir}/ibus write-cache --system &>/dev/null || : @@ -77,7 +91,16 @@ desktop-file-validate ${RPM_BUILD_ROOT}%{_datadir}/applications/ibus-setup-hangu %{_datadir}/applications/ibus-setup-hangul.desktop %{_datadir}/icons/hicolor/*/apps/* +%files tests +%dir %{_libexecdir}/installed-tests +%{_libexecdir}/installed-tests/ibus-hangul +%dir %{_datadir}/installed-tests +%{_datadir}/installed-tests/ibus-hangul + %changelog +* Thu Sep 10 2020 Peng Wu - 1.5.4-3 +- Add tests sub package + * Wed Sep 2 2020 Peng Wu - 1.5.4-2 - Clean up the spec file