public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/ibus] autotool: Add CI
@ 2026-05-31 2:07 Takao Fujiwara
0 siblings, 0 replies; only message in thread
From: Takao Fujiwara @ 2026-05-31 2:07 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/ibus
Branch : autotool
Commit : bdfd5f786b2db71d54404432633fe3dfcc2e8b82
Author : Takao Fujiwara <tfujiwar@redhat.com>
Date : 2019-07-29T19:18:59+09:00
Stats : +229/-5 in 6 file(s)
URL : https://src.fedoraproject.org/rpms/ibus/c/bdfd5f786b2db71d54404432633fe3dfcc2e8b82?branch=autotool
Log:
Add CI
---
diff --git a/ibus-HEAD.patch b/ibus-HEAD.patch
index 5535d68..b0ff887 100644
--- a/ibus-HEAD.patch
+++ b/ibus-HEAD.patch
@@ -14932,3 +14932,107 @@ index 0155e22a..61af74fb 100644
--
2.21.0
+From f4463c0433c5f48a4fb2830e8c2ae9619fbb18d1 Mon Sep 17 00:00:00 2001
+From: fujiwarat <takao.fujiwara1@gmail.com>
+Date: Mon, 29 Jul 2019 19:05:43 +0900
+Subject: [PATCH] src/tests: Fix a fatal error with g_warning
+
+I set g_log_set_always_fatal() before gtk_init() in ibus-compose for
+a compose warning of GtkIMContextSimple but actually the warning is
+output during gtk_main() due to GtkIMContextSimple.set_client_window()
+so I moved g_log_set_always_fatal() before gtk_main() in ibus-compose.c.
+
+Also set IFS in ibus-compose-locales to set the delimiter to '\n' for
+for-loop arguments.
+---
+ src/tests/ibus-compose-locales.in | 8 ++++++++
+ src/tests/ibus-compose.c | 21 ++++++++++-----------
+ 2 files changed, 18 insertions(+), 11 deletions(-)
+
+diff --git a/src/tests/ibus-compose-locales.in b/src/tests/ibus-compose-locales.in
+index fad02965..f650b584 100755
+--- a/src/tests/ibus-compose-locales.in
++++ b/src/tests/ibus-compose-locales.in
+@@ -7,19 +7,27 @@ BUILDDIR=`dirname $0`
+ export IBUS_COMPOSE_CACHE_DIR=$PWD
+
+ retval=0
++# Let for-loop notice '\n' as a delimiter
++IFS=$'\n'
+ for var in `cat $SRCDIR/ibus-compose.env`
+ do
++ # Revert IFS to recognize env a=foo b=foo
++ IFS=' '
+ IS_COMMENT=`echo "$var" | grep "^#"`
+ if [ "x$IS_COMMENT" != x ] ; then
+ continue
+ fi
++ echo "# Starting $var $BUILDDIR/ibus-compose $SRCDIR $@"
+ env $var $BUILDDIR/ibus-compose $SRCDIR $@
+ retval=`expr $retval + $?`
++ echo "# Finished $var $BUILDDIR/ibus-compose $SRCDIR $@ with $retval"
+
+ CACHE_FILES=`ls *.cache`
+ if [ x"$CACHE_FILES" != x ] ; then
+ echo "Clean $CACHE_FILES"
+ rm $CACHE_FILES
+ fi
++ IFS=$'\n'
+ done
++IFS=' '
+ exit $retval
+diff --git a/src/tests/ibus-compose.c b/src/tests/ibus-compose.c
+index db359477..4b4c56e7 100644
+--- a/src/tests/ibus-compose.c
++++ b/src/tests/ibus-compose.c
+@@ -331,20 +331,28 @@ create_window ()
+ static void
+ test_compose (void)
+ {
++ GLogLevelFlags flags;
+ if (!register_ibus_engine ()) {
+ g_test_fail ();
+ return;
+ }
+
+ create_window ();
++ /* FIXME:
++ * IBusIMContext opens GtkIMContextSimple as the slave and
++ * GtkIMContextSimple opens the compose table on el_GR.UTF-8, and the
++ * multiple outputs in el_GR's compose causes a warning in gtkcomposetable
++ * and the warning always causes a fatal in GTest:
++ " "GTK+ supports to output one char only: "
++ */
++ flags = g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL);
+ gtk_main ();
+-
++ g_log_set_always_fatal (flags);
+ }
+
+ int
+ main (int argc, char *argv[])
+ {
+- GLogLevelFlags flags;
+ const gchar *test_name;
+ gchar *test_path;
+
+@@ -354,16 +362,7 @@ main (int argc, char *argv[])
+ */
+ g_setenv ("NO_AT_BRIDGE", "1", TRUE);
+ g_test_init (&argc, &argv, NULL);
+- /* FIXME:
+- * IBusIMContext opens GtkIMContextSimple as the slave and
+- * GtkIMContextSimple opens the compose table on el_GR.UTF-8, and the
+- * multiple outputs in el_GR's compose causes a warning in gtkcomposetable
+- * and the warning always causes a fatal in GTest:
+- " "GTK+ supports to output one char only: "
+- */
+- flags = g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL);
+ gtk_init (&argc, &argv);
+- g_log_set_always_fatal (flags);
+
+ m_srcdir = argc > 1 ? g_strdup (argv[1]) : g_strdup (".");
+ m_compose_file = g_strdup (g_getenv ("COMPOSE_FILE"));
+--
+2.21.0
+
diff --git a/ibus.spec b/ibus.spec
index ce7b91a..4c043d0 100644
--- a/ibus.spec
+++ b/ibus.spec
@@ -35,7 +35,7 @@
Name: ibus
Version: 1.5.20
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: Intelligent Input Bus for Linux OS
License: LGPLv2+
URL: https://github.com/ibus/%name/wiki
@@ -234,8 +234,9 @@ BuildArch: noarch
The ibus-devel-docs package contains developer documentation for IBus
%package desktop-testing
-Summary: Wrapper of InstalledTests Runner for IBus
-Requires: %{name}%{?_isa} = %{version}-%{release}
+Summary: Wrapper of InstalledTests Runner for IBus
+Requires: %{name} = %{version}-%{release}
+BuildArch: noarch
%description desktop-testing
GNOME desktop testing runner implements the InstalledTests specification
@@ -244,8 +245,8 @@ The wrapper script runs gnome-session for the focus events and GNOME
desktop testing runner internally.
%package tests
-Summary: Tests for the %{name} package
-Requires: %{name}%{?_isa} = %{version}-%{release}
+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
@@ -463,6 +464,10 @@ dconf update || :
%{_datadir}/installed-tests/ibus
%changelog
+* Mon Jul 29 2019
+Takao Fujiwara <tfujiwar@redhat.com> - 1.5.20-7
+- Add CI
+
* Fri Jul 26 2019 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.20-6
- Update ibus-HEAD.patch from upstream
Integrate a new compose feature
diff --git a/tests/roles/ibus-desktop-testing-role/defaults/main.yml b/tests/roles/ibus-desktop-testing-role/defaults/main.yml
new file mode 100644
index 0000000..8ff7991
--- /dev/null
+++ b/tests/roles/ibus-desktop-testing-role/defaults/main.yml
@@ -0,0 +1,3 @@
+role_pkgs_req:
+ - rsync
+ - xorg-x11-server-Xvfb
diff --git a/tests/roles/ibus-desktop-testing-role/meta/main.yml b/tests/roles/ibus-desktop-testing-role/meta/main.yml
new file mode 100644
index 0000000..6626402
--- /dev/null
+++ b/tests/roles/ibus-desktop-testing-role/meta/main.yml
@@ -0,0 +1,4 @@
+---
+
+dependencies:
+ - role: str-common-init
diff --git a/tests/roles/ibus-desktop-testing-role/tasks/main.yml b/tests/roles/ibus-desktop-testing-role/tasks/main.yml
new file mode 100644
index 0000000..b1666d5
--- /dev/null
+++ b/tests/roles/ibus-desktop-testing-role/tasks/main.yml
@@ -0,0 +1,100 @@
+---
+- name: Check if GNOME installed-tests testing harness is installed
+ register: gnome_desktop_testing_runner
+ find:
+ paths: "{{ ansible_env.PATH.split(':') }}"
+ pattern: gnome-desktop-testing-runner
+
+- name: Build and install GNOME installed-tests testing harness
+ when: gnome_desktop_testing_runner.matched == 0
+ block:
+ - name: Installing build dependencies for GNOME installed-tests testing harness
+ package:
+ name:
+ - git
+ - make
+ - gcc
+ - diffutils
+ - autoconf
+ - automake
+ - libtool
+ - glib2-devel
+ - systemd-devel
+ - gnome-session
+ - gnome-shell
+ - dbus-x11
+ - xorg-x11-server-Xvfb
+ - ibus
+ - ibus-desktop-testing
+ - ibus-tests
+ # ibus-compose test needs locales
+ - glibc-langpack-el
+ - glibc-langpack-fi
+ - glibc-langpack-pt
+
+ - name: Fetching GNOME installed-tests testing harness source from remote repository
+ git:
+ repo: 'https://gitlab.gnome.org/GNOME/gnome-desktop-testing.git'
+ dest: gnome-desktop-testing
+ force: yes
+
+ - name: Configure GNOME installed-tests testing harness build
+ command: ./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var
+ args:
+ chdir: gnome-desktop-testing
+
+ - name: Build GNOME installed-tests testing harness
+ command: make
+ args:
+ chdir: gnome-desktop-testing
+
+ - name: Install GNOME installed-tests testing harness
+ command: make install
+ args:
+ chdir: gnome-desktop-testing
+
+- name: Start GNOME installed-tests testing harness
+ block:
+ - name: Execute tests
+ shell: |
+ set -e
+ status="FAIL: frame"
+ env TMPDIR='{{ remote_artifacts }}' G_MESSAGES_DEBUG='all' \
+ ibus-desktop-testing-runner \
+ --no-graphics \
+ --runner=gnome \
+ --tests='{{ installed_test_name }}' \
+ --output='{{ remote_artifacts }}/{{ installed_test_name }}.log' \
+ --result='{{ remote_artifacts }}/test.log' \
+ null
+ if [ $? -eq 0 ]; then
+ status="PASS: frame"
+ fi
+ echo "${status} $TEST" >> {{ remote_artifacts }}/test.log
+
+ - name: Check the results
+ #shell: grep "^FAIL" {{ remote_artifacts }}/test.log
+ shell: |
+ log="{{ remote_artifacts }}/test.log"
+ if [ ! -f $log ] ; then
+ echo ERROR
+ else
+ FAIL=`grep "^FAIL: " {{ remote_artifacts }}/test.log | grep -v 'FAIL: 0$'`
+ if [ x"$FAIL" != x ] ; then
+ echo ERROR
+ else
+ echo PASS
+ fi
+ fi
+ register: test_fails
+ #failed_when: False
+
+ - name: Set role result
+ set_fact:
+ role_result: "{{ test_fails.stdout }}"
+ role_result_failed: "{{ (test_fails.stdout|d|length > 0) or (test_fails.stderr|d|length > 0) }}"
+ role_result_msg: "{{ test_fails.stdout|d('tests failed.') }}"
+
+ - include_role:
+ name: str-common-final
+
diff --git a/tests/tests.yml b/tests/tests.yml
new file mode 100644
index 0000000..8282772
--- /dev/null
+++ b/tests/tests.yml
@@ -0,0 +1,8 @@
+- hosts: localhost
+ roles:
+ - role: ibus-desktop-testing-role
+ installed_test_name: ibus
+ tags:
+ - classic
+ - gating
+
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-05-31 2:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-31 2:07 [rpms/ibus] autotool: Add CI Takao Fujiwara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox