Update ibus-desktop-testing-runner to always run ibus-daemon directly
This commit is contained in:
parent
f7077113ed
commit
c9cc2c8286
165
ibus-HEAD.patch
165
ibus-HEAD.patch
@ -76,3 +76,168 @@ index a5e5e792..e314ae98 100644
|
||||
--
|
||||
2.34.1
|
||||
|
||||
From 37900574934bb01cc31860ae3ae2f668e4360838 Mon Sep 17 00:00:00 2001
|
||||
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||
Date: Mon, 28 Mar 2022 23:18:58 +0900
|
||||
Subject: [PATCH] src/tests: Run ibus-daemon from CI even if GNOME desktop
|
||||
|
||||
gnome-shell no longer launch ibus-daemon with IBus systemd file.
|
||||
This is a workaround to call ibus-daemon after GNOME fails to
|
||||
launch ibus-daemon
|
||||
|
||||
BUG=https://gitlab.gnome.org/GNOME/gdm/-/issues/777
|
||||
---
|
||||
src/tests/ibus-desktop-testing-runner.in | 38 +++++++++++++++++++++---
|
||||
1 file changed, 34 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/tests/ibus-desktop-testing-runner.in b/src/tests/ibus-desktop-testing-runner.in
|
||||
index 48528326..6b208345 100755
|
||||
--- a/src/tests/ibus-desktop-testing-runner.in
|
||||
+++ b/src/tests/ibus-desktop-testing-runner.in
|
||||
@@ -55,6 +55,7 @@ GREEN='\033[0;32m'
|
||||
RED='\033[0;31m'
|
||||
NC='\033[0m'
|
||||
|
||||
+
|
||||
print_log()
|
||||
{
|
||||
if [ x"$RESULT_LOG" != x ] ; then
|
||||
@@ -69,6 +70,7 @@ print_log()
|
||||
fi
|
||||
}
|
||||
|
||||
+
|
||||
usage()
|
||||
{
|
||||
$ECHO -e \
|
||||
@@ -95,6 +97,7 @@ usage()
|
||||
""
|
||||
}
|
||||
|
||||
+
|
||||
parse_args()
|
||||
{
|
||||
# This is GNU getopt. "sudo port getopt" in BSD?
|
||||
@@ -129,6 +132,7 @@ parse_args()
|
||||
fi
|
||||
}
|
||||
|
||||
+
|
||||
init_desktop()
|
||||
{
|
||||
if [ "$RESULT_LOG" != "" ] ; then
|
||||
@@ -207,6 +211,7 @@ _EOF
|
||||
#export XDG_SEAT=seat0
|
||||
}
|
||||
|
||||
+
|
||||
run_dbus_daemon()
|
||||
{
|
||||
# Use dbus-launch --exit-with-session later instead of --sh-syntax
|
||||
@@ -216,6 +221,7 @@ run_dbus_daemon()
|
||||
export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$UID/bus"
|
||||
}
|
||||
|
||||
+
|
||||
init_gnome()
|
||||
{
|
||||
# gsettings set command needs dconf-service with the same $DISPLAY
|
||||
@@ -258,6 +264,7 @@ init_gnome()
|
||||
fi
|
||||
}
|
||||
|
||||
+
|
||||
run_desktop()
|
||||
{
|
||||
echo "$DESKTOP_COMMAND" | grep gnome-session > /dev/null
|
||||
@@ -278,12 +285,28 @@ run_desktop()
|
||||
$DESKTOP_COMMAND &
|
||||
PID_GNOME_SESSION=$!
|
||||
sleep 30
|
||||
- if [ $HAS_GNOME -ne 0 ] ; then
|
||||
- ibus-daemon --daemonize --verbose
|
||||
- sleep 3
|
||||
- fi
|
||||
+
|
||||
+ # gnome-shell 42 checks if org.freedesktop.IBus.session.GNOME.service
|
||||
+ # systemd file is available with org.freedesktop.systemd1.Manager.GetUnit
|
||||
+ # D-Bus method, which is provided by IBus 1.5.26, and if the file
|
||||
+ # is available, gnome-shell no longer launch ibus-daemon
|
||||
+ # because gnome-shell assumes gnome-session would launch ibus-daemon
|
||||
+ # with org.freedesktop.systemd1.Manager.StartUnit D-Bus method.
|
||||
+ # But actually gnome-session failed to launch ibus-daemon
|
||||
+ # because the IBus systemd file depends on gnome-session.target
|
||||
+ # but this CI launches gnome-session directly.
|
||||
+ #
|
||||
+ # So ibus-dameon is now always called here after gnome-shell fails to
|
||||
+ # launch ibus-daemon.
|
||||
+ # It may be better this CI launches GDM autologin to run gnome-session
|
||||
+ # with gnome-session.target systemd file.
|
||||
+ # But `systemctl start gdm` terminates the parent script forcibly
|
||||
+ # and the script cannot get the CI result.
|
||||
+ ibus-daemon --daemonize --verbose
|
||||
+ sleep 3
|
||||
}
|
||||
|
||||
+
|
||||
count_case_result()
|
||||
{
|
||||
retval=$1
|
||||
@@ -298,6 +321,7 @@ count_case_result()
|
||||
echo $pass $fail
|
||||
}
|
||||
|
||||
+
|
||||
echo_case_result()
|
||||
{
|
||||
retval=$1
|
||||
@@ -311,6 +335,7 @@ echo_case_result()
|
||||
fi
|
||||
}
|
||||
|
||||
+
|
||||
run_direct_test_cases()
|
||||
{
|
||||
pass=0
|
||||
@@ -363,6 +388,7 @@ EOF_ENVS
|
||||
echo $pass $fail
|
||||
}
|
||||
|
||||
+
|
||||
run_gnome_desktop_testing_runner()
|
||||
{
|
||||
pass=0
|
||||
@@ -397,6 +423,7 @@ EOF
|
||||
echo $pass $fail
|
||||
}
|
||||
|
||||
+
|
||||
run_test_suite()
|
||||
{
|
||||
pass=0
|
||||
@@ -435,6 +462,7 @@ EOF_RUNNER
|
||||
fi
|
||||
}
|
||||
|
||||
+
|
||||
finit()
|
||||
{
|
||||
echo "# Killing left gnome-session and Xorg"
|
||||
@@ -451,6 +479,7 @@ finit()
|
||||
echo "# Finished $PROGNAME testing"
|
||||
}
|
||||
|
||||
+
|
||||
main()
|
||||
{
|
||||
parse_args "$@"
|
||||
@@ -470,5 +499,6 @@ main()
|
||||
finit
|
||||
}
|
||||
|
||||
+
|
||||
# Need to enclose $@ with double quotes not to split the array.
|
||||
main "$@"
|
||||
--
|
||||
2.34.1
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
|
||||
Name: ibus
|
||||
Version: 1.5.26
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Intelligent Input Bus for Linux OS
|
||||
License: LGPLv2+
|
||||
URL: https://github.com/ibus/%name/wiki
|
||||
@ -521,6 +521,9 @@ dconf update || :
|
||||
%{_datadir}/installed-tests/ibus
|
||||
|
||||
%changelog
|
||||
* Mon Mar 28 2022 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.26-2
|
||||
- Update ibus-desktop-testing-runner to always run ibus-daemon directly
|
||||
|
||||
* Mon Mar 14 2022 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.26-1
|
||||
- Bump to 1.5.26
|
||||
- Revert CCedilla change for pt-BR
|
||||
|
Loading…
Reference in New Issue
Block a user