commit:     b1bd9b45d1d5217a547f0d119b6162e0c3280282
Author:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 15 13:40:23 2021 +0000
Commit:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
CommitDate: Fri Oct 15 13:40:23 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1bd9b45

app-i18n/ibus-hangul: fix tests

Closes: https://bugs.gentoo.org/740466
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Akinori Hattori <hattya <AT> gentoo.org>

 app-i18n/ibus-hangul/files/ibus-hangul-test.patch | 20 ++++++++++++++++++++
 app-i18n/ibus-hangul/ibus-hangul-1.5.4.ebuild     | 14 ++++++++++++--
 2 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/app-i18n/ibus-hangul/files/ibus-hangul-test.patch 
b/app-i18n/ibus-hangul/files/ibus-hangul-test.patch
new file mode 100644
index 00000000000..7a6ef479f0e
--- /dev/null
+++ b/app-i18n/ibus-hangul/files/ibus-hangul-test.patch
@@ -0,0 +1,20 @@
+--- a/tests/ibus-hangul.c
++++ b/tests/ibus-hangul.c
+@@ -261,6 +261,7 @@
+                       G_CALLBACK (window_inserted_text_cb), entry);
+     gtk_container_add (GTK_CONTAINER (window), entry);
+     gtk_widget_show_all (window);
++    gtk_window_present (window);
+ }
+ 
+ static void
+--- a/tests/runtest
++++ b/tests/runtest
+@@ -7,7 +7,6 @@
+ : ${DISABLE_GUI_TESTS:=''}
+ 
+ ibus-daemon --xim --panel disable --config disable &
+-sleep 30
+ 
+ tst=$1
+ 

diff --git a/app-i18n/ibus-hangul/ibus-hangul-1.5.4.ebuild 
b/app-i18n/ibus-hangul/ibus-hangul-1.5.4.ebuild
index 4d13e3d9b11..e8b64f68faa 100644
--- a/app-i18n/ibus-hangul/ibus-hangul-1.5.4.ebuild
+++ b/app-i18n/ibus-hangul/ibus-hangul-1.5.4.ebuild
@@ -2,9 +2,9 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="7"
+PYTHON_COMPAT=( python3_{8..9} )
 
-PYTHON_COMPAT=( python3_{8,9} )
-inherit gnome2-utils python-single-r1 xdg
+inherit gnome2-utils python-single-r1 xdg virtualx
 
 DESCRIPTION="Korean Hangul engine for IBus"
 HOMEPAGE="https://github.com/libhangul/ibus-hangul/wiki";
@@ -27,12 +27,22 @@ DEPEND="${RDEPEND}"
 BDEPEND="sys-devel/gettext
        virtual/pkgconfig"
 
+PATCHES=( "${FILESDIR}"/${PN}-test.patch )
+
 src_configure() {
        econf \
                $(use_enable nls) \
                --with-python=${EPYTHON}
 }
 
+src_test() {
+       "${BROOT}"${GLIB_COMPILE_SCHEMAS} --allow-any-name "${S}"/data || die
+
+       export GSETTINGS_BACKEND="memory"
+       export GSETTINGS_SCHEMA_DIR="${S}/data"
+       virtx default
+}
+
 pkg_preinst() {
        xdg_pkg_preinst
        gnome2_schemas_savelist

Reply via email to