| |
@@ -3,7 +3,7 @@
|
| |
%global _python_bytecompile_extra 1
|
| |
|
| |
Name: ibus-table
|
| |
- Version: 1.10.0
|
| |
+ Version: 1.10.1
|
| |
Release: 1%{?dist}
|
| |
Summary: The Table engine for IBus platform
|
| |
License: LGPLv2+
|
| |
@@ -15,9 +15,15 @@
|
| |
BuildRequires: gcc
|
| |
BuildRequires: ibus-devel > 1.3.0
|
| |
BuildRequires: python3-devel
|
| |
- BuildRequires: libappstream-glib
|
| |
# for the unit tests
|
| |
+ BuildRequires: appstream
|
| |
+ BuildRequires: libappstream-glib
|
| |
+ BuildRequires: desktop-file-utils
|
| |
+ BuildRequires: python3-mock
|
| |
+ BuildRequires: python3-gobject
|
| |
+ BuildRequires: python3-gobject-base
|
| |
BuildRequires: dbus-x11
|
| |
+ BuildRequires: xorg-x11-server-Xvfb
|
| |
BuildRequires: ibus-table-chinese-wubi-jidian
|
| |
BuildRequires: ibus-table-chinese-cangjie
|
| |
BuildRequires: ibus-table-chinese-stroke5
|
| |
@@ -25,6 +31,8 @@
|
| |
BuildRequires: ibus-table-latin
|
| |
BuildRequires: ibus-table-translit
|
| |
BuildRequires: ibus-table-tv
|
| |
+ # A window manger is needed for the GUI test
|
| |
+ BuildRequires: i3
|
| |
|
| |
Obsoletes: ibus-table-additional < 1.2.0.20100111-5
|
| |
|
| |
@@ -40,12 +48,20 @@
|
| |
%description -n %{name}-devel
|
| |
Development files for %{name}.
|
| |
|
| |
+ %package tests
|
| |
+ Summary: Tests for the %{name} package
|
| |
+ Requires: %{name} = %{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
|
| |
|
| |
%build
|
| |
export PYTHON=%{__python3}
|
| |
- %configure --disable-static --disable-additional
|
| |
+ %configure --disable-static --disable-additional --enable-installed-tests
|
| |
%__make %{?_smp_mflags}
|
| |
|
| |
%install
|
| |
@@ -56,6 +72,7 @@
|
| |
%find_lang %{name}
|
| |
|
| |
%check
|
| |
+ appstreamcli validate --pedantic --explain --no-net %{buildroot}/%{_datadir}/metainfo/*.appdata.xml
|
| |
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdata.xml
|
| |
desktop-file-validate \
|
| |
$RPM_BUILD_ROOT%{_datadir}/applications/ibus-setup-table.desktop
|
| |
@@ -74,11 +91,32 @@
|
| |
dconf write /org/freedesktop/ibus/engine/table/wubi-jidian/chinesemode 1
|
| |
dconf write /org/freedesktop/ibus/engine/table/wubi-jidian/spacekeybehavior false
|
| |
dconf dump /
|
| |
- ibus-daemon -drx
|
| |
- make -C tests run_tests
|
| |
- pushd tests
|
| |
- ./run_tests
|
| |
- popd
|
| |
+ export DISPLAY=:1
|
| |
+ Xvfb $DISPLAY -screen 0 1024x768x16 &
|
| |
+ # A window manager and and ibus-daemon are needed to run the GUI
|
| |
+ # test tests/test_gtk.py, for example i3 can be used.
|
| |
+ #
|
| |
+ # To debug what is going on if there is a problem with the GUI test
|
| |
+ # add BuildRequires: x11vnc and start a vnc server:
|
| |
+ #
|
| |
+ # x11vnc -display $DISPLAY -unixsock /tmp/mysock -bg -nopw -listen localhost -xkb
|
| |
+ #
|
| |
+ # Then one can view what is going on outside of the chroot with vncviewer:
|
| |
+ #
|
| |
+ # vncviewer /var/lib/mock/fedora-32-x86_64/root/tmp/mysock
|
| |
+ #
|
| |
+ # The GUI test will be skipped if XDG_SESSION_TYPE is not x11 or wayland.
|
| |
+ #
|
| |
+ #ibus-daemon -drx
|
| |
+ #touch /tmp/i3config
|
| |
+ #i3 -c /tmp/i3config &
|
| |
+ #export XDG_SESSION_TYPE=x11
|
| |
+
|
| |
+ make check && rc=0 || rc=1
|
| |
+ cat tests/*.log
|
| |
+ if [ $rc != 0 ] ; then
|
| |
+ exit $rc
|
| |
+ fi
|
| |
|
| |
%post
|
| |
[ -x %{_bindir}/ibus ] && \
|
| |
@@ -104,7 +142,19 @@
|
| |
%files devel
|
| |
%{_datadir}/pkgconfig/%{name}.pc
|
| |
|
| |
+ %files tests
|
| |
+ %dir %{_libexecdir}/installed-tests
|
| |
+ %{_libexecdir}/installed-tests/%{name}
|
| |
+ %dir %{_datadir}/installed-tests
|
| |
+ %{_datadir}/installed-tests/%{name}
|
| |
+
|
| |
%changelog
|
| |
+ * Wed Jul 15 2020 Mike FABIAN <mfabian@redhat.com> - 1.10.1-1
|
| |
+ - Update to 1.10.1
|
| |
+ - Add GUI test
|
| |
+ - Make output of ibus-table-createdb deterministic
|
| |
+ - Update translations from Weblate (updated fr, tr, zh_CN)
|
| |
+
|
| |
* Wed Jul 01 2020 Mike FABIAN <mfabian@redhat.com> - 1.10.0-1
|
| |
- Update to 1.10.0
|
| |
- Add suggestion mode feature
|
| |