Add --screendump option in ibus-desktop-testing-runner
- Add ibus-desktop-testing-autostart - Depend on gnome-desktop-testing instead of pulling from Git - Move engine specific dependencies to tests.yml
This commit is contained in:
parent
9aa0978c6a
commit
611fd049eb
215
ibus-HEAD.patch
215
ibus-HEAD.patch
@ -54,3 +54,218 @@ index da9a402f..e66125df 100644
|
|||||||
--
|
--
|
||||||
2.28.0
|
2.28.0
|
||||||
|
|
||||||
|
From 179ebddf4dbde1cef1cea2df4e659cf4940d1a30 Mon Sep 17 00:00:00 2001
|
||||||
|
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||||
|
Date: Fri, 27 Aug 2021 20:05:02 +0900
|
||||||
|
Subject: [PATCH] src/tests: Add --screendump option in
|
||||||
|
ibus-desktop-testing-runner
|
||||||
|
|
||||||
|
The screendump is useful in CI to if check gnome-shell-extension-no-overview
|
||||||
|
works.
|
||||||
|
Also add ibus-desktop-testing-autostart to get the debug info in CI.
|
||||||
|
You can copy ibus-desktop-testing.desktop to $HOME/.config/autostart
|
||||||
|
if CI fails.
|
||||||
|
---
|
||||||
|
src/tests/Makefile.am | 11 +++++
|
||||||
|
src/tests/ibus-desktop-testing-autostart | 55 +++++++++++++++++++++++
|
||||||
|
src/tests/ibus-desktop-testing-runner.in | 20 +++++++--
|
||||||
|
src/tests/ibus-desktop-testing.desktop.in | 11 +++++
|
||||||
|
4 files changed, 93 insertions(+), 4 deletions(-)
|
||||||
|
create mode 100755 src/tests/ibus-desktop-testing-autostart
|
||||||
|
create mode 100644 src/tests/ibus-desktop-testing.desktop.in
|
||||||
|
|
||||||
|
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
|
||||||
|
index 13c06eb4..7d00f236 100644
|
||||||
|
--- a/src/tests/Makefile.am
|
||||||
|
+++ b/src/tests/Makefile.am
|
||||||
|
@@ -96,6 +96,7 @@ test_sourcesdir = $(datadir)/installed-tests/ibus
|
||||||
|
CLEANFILES += \
|
||||||
|
$(test_metas) \
|
||||||
|
ibus-desktop-testing-runner \
|
||||||
|
+ org.freedesktop.IBus.Desktop.Testing.desktop \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
test_execs_PROGRAMS = $(TESTS)
|
||||||
|
@@ -106,6 +107,14 @@ CLEANFILES += \
|
||||||
|
$(NULL)
|
||||||
|
endif
|
||||||
|
test_execsdir = $(libexecdir)/installed-tests/ibus
|
||||||
|
+libexec_SCRIPTS = ibus-desktop-testing-autostart
|
||||||
|
+
|
||||||
|
+test_frame_DATA = org.freedesktop.IBus.Desktop.Testing.desktop
|
||||||
|
+test_framedir = $(pkgdatadir)/tests
|
||||||
|
+org.freedesktop.IBus.Desktop.Testing.desktop: ibus-desktop-testing.desktop.in
|
||||||
|
+ $(AM_V_GEN) sed -e "s|\@libexecdir\@|$(libexecdir)|g" \
|
||||||
|
+ $< > $@.tmp && \
|
||||||
|
+ mv $@.tmp $@
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(test_metas): $(test_metas_in) $(test_programs)
|
||||||
|
@@ -133,6 +142,8 @@ EXTRA_DIST = \
|
||||||
|
ibus-compose.emoji \
|
||||||
|
ibus-compose.env \
|
||||||
|
ibus-compose-locales.in \
|
||||||
|
+ ibus-desktop-testing.desktop.in \
|
||||||
|
+ ibus-desktop-testing-autostart \
|
||||||
|
ibus-desktop-testing-runner.in \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
diff --git a/src/tests/ibus-desktop-testing-autostart b/src/tests/ibus-desktop-testing-autostart
|
||||||
|
new file mode 100755
|
||||||
|
index 00000000..da22b64e
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/tests/ibus-desktop-testing-autostart
|
||||||
|
@@ -0,0 +1,55 @@
|
||||||
|
+#!/bin/sh
|
||||||
|
+# -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*-
|
||||||
|
+# vim:set noet ts=4:
|
||||||
|
+#
|
||||||
|
+# ibus - The Input Bus
|
||||||
|
+#
|
||||||
|
+# Copyright (c) 2021 Takao Fujiwara <takao.fujiwara1@gmail.com>
|
||||||
|
+# Copyright (c) 2021 Red Hat, Inc.
|
||||||
|
+#
|
||||||
|
+# This program is free software; you can redistribute it and/or modify
|
||||||
|
+# it under the terms of the GNU General Public License as published by
|
||||||
|
+# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
+# (at your option) any later version.
|
||||||
|
+#
|
||||||
|
+# This program is distributed in the hope that it will be useful,
|
||||||
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
+# GNU General Public License for more details.
|
||||||
|
+#
|
||||||
|
+# You should have received a copy of the GNU General Public License along
|
||||||
|
+# with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
+
|
||||||
|
+TEST_LOG=
|
||||||
|
+COMMANDS='
|
||||||
|
+id
|
||||||
|
+echo $DISPLAY
|
||||||
|
+pwd
|
||||||
|
+pstree -asp $$
|
||||||
|
+gsettings list-recursively org.gnome.shell
|
||||||
|
+rpm -q gnome-shell-extension-no-overview gnome-shell gnome-session
|
||||||
|
+'
|
||||||
|
+
|
||||||
|
+if [ $# -gt 0 ] ; then
|
||||||
|
+ TEST_LOG=$1
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+run_test()
|
||||||
|
+{
|
||||||
|
+while read cmd ; do
|
||||||
|
+ if [ x"$cmd" = x ] ; then
|
||||||
|
+ continue
|
||||||
|
+ fi
|
||||||
|
+ echo "# $cmd"
|
||||||
|
+ eval "$cmd"
|
||||||
|
+done << EOF_COMMANDS
|
||||||
|
+`echo "$COMMANDS"`
|
||||||
|
+EOF_COMMANDS
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+if [ x"$TEST_LOG" = x ] ; then
|
||||||
|
+ run_test
|
||||||
|
+else
|
||||||
|
+ run_test 2>>$TEST_LOG 1>>$TEST_LOG
|
||||||
|
+fi
|
||||||
|
diff --git a/src/tests/ibus-desktop-testing-runner.in b/src/tests/ibus-desktop-testing-runner.in
|
||||||
|
index c1016703..48528326 100755
|
||||||
|
--- a/src/tests/ibus-desktop-testing-runner.in
|
||||||
|
+++ b/src/tests/ibus-desktop-testing-runner.in
|
||||||
|
@@ -36,13 +36,14 @@
|
||||||
|
|
||||||
|
|
||||||
|
PROGNAME=`basename $0`
|
||||||
|
-VERSION=0.2
|
||||||
|
+VERSION=0.3
|
||||||
|
DISPLAY=:99.0
|
||||||
|
BUILDDIR="."
|
||||||
|
SRCDIR="."
|
||||||
|
TEST_LOG="test-suite.log"
|
||||||
|
TEST_LOG_STDOUT=0
|
||||||
|
RESULT_LOG=""
|
||||||
|
+SCREEN_LOG=""
|
||||||
|
HAVE_GRAPHICS=1
|
||||||
|
DESKTOP_COMMAND="dbus-launch --exit-with-session gnome-session"
|
||||||
|
PID_XORG=0
|
||||||
|
@@ -90,14 +91,15 @@ usage()
|
||||||
|
"-T, --timeout=TIMEOUT Set timeout (default TIMEOUT is 300 sec).\n" \
|
||||||
|
"-o, --output=OUTPUT_FILE OUtput the log to OUTPUT_FILE\n" \
|
||||||
|
"-O, --result=RESULT_FILE OUtput the result to RESULT_FILE\n" \
|
||||||
|
+"-S, --screendump=DUMP_FILE OUtput the screen to DUMP_FILE ('STDOUT' can be stdout)\n" \
|
||||||
|
""
|
||||||
|
}
|
||||||
|
|
||||||
|
parse_args()
|
||||||
|
{
|
||||||
|
# This is GNU getopt. "sudo port getopt" in BSD?
|
||||||
|
- ARGS=`getopt -o hvb:s:cd:t:r:T:o:O: --long \
|
||||||
|
- help,version,builddir:,srcdir:,no-graphics,desktop:,tests:,runner:,timeout:,output:,result:\
|
||||||
|
+ ARGS=`getopt -o hvb:s:cd:t:r:T:o:O:S: --long \
|
||||||
|
+ help,version,builddir:,srcdir:,no-graphics,desktop:,tests:,runner:,timeout:,output:,result:,screendump:\
|
||||||
|
-- "$@"`;
|
||||||
|
eval set -- "$ARGS"
|
||||||
|
while [ 1 ] ; do
|
||||||
|
@@ -113,6 +115,7 @@ parse_args()
|
||||||
|
-T | --timeout ) TIMEOUT="$2"; shift 2;;
|
||||||
|
-o | --output ) TEST_LOG="$2"; shift 2;;
|
||||||
|
-O | --result ) RESULT_LOG="$2"; shift 2;;
|
||||||
|
+ -S | --screendump ) SCREEN_LOG="$2"; shift 2;;
|
||||||
|
-- ) shift; break;;
|
||||||
|
* ) usage; exit 1;;
|
||||||
|
esac
|
||||||
|
@@ -259,6 +262,7 @@ run_desktop()
|
||||||
|
{
|
||||||
|
echo "$DESKTOP_COMMAND" | grep gnome-session > /dev/null
|
||||||
|
HAS_GNOME=$?
|
||||||
|
+ export DISPLAY=$DISPLAY
|
||||||
|
if test $HAVE_GRAPHICS -eq 1 ; then
|
||||||
|
/usr/libexec/Xorg.wrap -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./xorg.log -config ./xorg.conf -configdir . $DISPLAY &
|
||||||
|
else
|
||||||
|
@@ -266,7 +270,6 @@ run_desktop()
|
||||||
|
fi
|
||||||
|
PID_XORG=$!
|
||||||
|
sleep 1
|
||||||
|
- export DISPLAY=$DISPLAY
|
||||||
|
# init_gnome need to be called with $DISPLAY before gnome-session is called
|
||||||
|
if [ $HAS_GNOME -eq 0 ] ; then
|
||||||
|
init_gnome
|
||||||
|
@@ -454,6 +457,15 @@ main()
|
||||||
|
init_desktop
|
||||||
|
run_dbus_daemon 2>>$TEST_LOG 1>>$TEST_LOG
|
||||||
|
run_desktop 2>>$TEST_LOG 1>>$TEST_LOG
|
||||||
|
+ if [ x"$SCREEN_LOG" != x ] ; then
|
||||||
|
+ SCREEN_PNG="`date '+%Y%m%d%H%M%S'`.png"
|
||||||
|
+ gnome-screenshot --file=$SCREEN_PNG
|
||||||
|
+ if [ x"$SCREEN_LOG" = xSTDOUT ] ; then
|
||||||
|
+ base64 $SCREEN_PNG
|
||||||
|
+ else
|
||||||
|
+ base64 $SCREEN_PNG > $SCREEN_LOG
|
||||||
|
+ fi
|
||||||
|
+ fi
|
||||||
|
run_test_suite
|
||||||
|
finit
|
||||||
|
}
|
||||||
|
diff --git a/src/tests/ibus-desktop-testing.desktop.in b/src/tests/ibus-desktop-testing.desktop.in
|
||||||
|
new file mode 100644
|
||||||
|
index 00000000..fa0c9b40
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/tests/ibus-desktop-testing.desktop.in
|
||||||
|
@@ -0,0 +1,11 @@
|
||||||
|
+[Desktop Entry]
|
||||||
|
+Name=IBus Desktop Testing Runner
|
||||||
|
+GenericName=Input Method Desktop Testing Runner
|
||||||
|
+Comment=Test plugin for IBus Desktop Testing
|
||||||
|
+Exec=@ibexecdir@/ibus-desktop-testing-autostart /var/tmp/ibus-ci-autostart.log
|
||||||
|
+Terminal=false
|
||||||
|
+Type=Application
|
||||||
|
+Encoding=UTF-8
|
||||||
|
+Icon=ibus
|
||||||
|
+Categories=System
|
||||||
|
+Keywords=im;
|
||||||
|
--
|
||||||
|
2.28.0
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
Name: ibus
|
Name: ibus
|
||||||
Version: 1.5.25
|
Version: 1.5.25
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Intelligent Input Bus for Linux OS
|
Summary: Intelligent Input Bus for Linux OS
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: https://github.com/ibus/%name/wiki
|
URL: https://github.com/ibus/%name/wiki
|
||||||
@ -414,7 +414,7 @@ dconf update || :
|
|||||||
%{_datadir}/glib-2.0/schemas/*.xml
|
%{_datadir}/glib-2.0/schemas/*.xml
|
||||||
%{_datadir}/ibus/component
|
%{_datadir}/ibus/component
|
||||||
%{_datadir}/ibus/dicts
|
%{_datadir}/ibus/dicts
|
||||||
%{_datadir}/ibus/engine
|
%dir %{_datadir}/ibus/engine
|
||||||
%{_datadir}/ibus/keymaps
|
%{_datadir}/ibus/keymaps
|
||||||
%{_datadir}/icons/hicolor/*/apps/*
|
%{_datadir}/icons/hicolor/*/apps/*
|
||||||
%{_datadir}/man/man1/ibus.1.gz
|
%{_datadir}/man/man1/ibus.1.gz
|
||||||
@ -502,6 +502,8 @@ dconf update || :
|
|||||||
|
|
||||||
%files desktop-testing
|
%files desktop-testing
|
||||||
%{_bindir}/ibus-desktop-testing-runner
|
%{_bindir}/ibus-desktop-testing-runner
|
||||||
|
%{_datadir}/ibus/tests
|
||||||
|
%{_libexecdir}/ibus-desktop-testing-autostart
|
||||||
|
|
||||||
%files tests
|
%files tests
|
||||||
%dir %{_libexecdir}/installed-tests
|
%dir %{_libexecdir}/installed-tests
|
||||||
@ -510,6 +512,9 @@ dconf update || :
|
|||||||
%{_datadir}/installed-tests/ibus
|
%{_datadir}/installed-tests/ibus
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Aug 27 2021 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.25-2
|
||||||
|
- Add --screendump option in ibus-desktop-testing-runner
|
||||||
|
|
||||||
* Fri Aug 20 2021 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.25-1
|
* Fri Aug 20 2021 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.25-1
|
||||||
- Bump to 1.5.25
|
- Bump to 1.5.25
|
||||||
|
|
||||||
|
@ -11,47 +11,66 @@
|
|||||||
- name: Installing build dependencies for IBus and GNOME installed-tests testing harness
|
- name: Installing build dependencies for IBus and GNOME installed-tests testing harness
|
||||||
package:
|
package:
|
||||||
name:
|
name:
|
||||||
- git
|
# IBus CI sets
|
||||||
- make
|
|
||||||
- gcc
|
|
||||||
- diffutils
|
|
||||||
- autoconf
|
|
||||||
- automake
|
|
||||||
- libtool
|
|
||||||
- glib2-devel
|
|
||||||
- systemd-devel
|
|
||||||
- gnome-session
|
|
||||||
- gnome-shell
|
|
||||||
- dbus-x11
|
|
||||||
- xorg-x11-server-Xvfb
|
- xorg-x11-server-Xvfb
|
||||||
- ibus
|
- ibus
|
||||||
- ibus-desktop-testing
|
- ibus-desktop-testing
|
||||||
- ibus-tests
|
- dbus-x11
|
||||||
# ibus-compose test needs locales
|
- gnome-desktop-testing
|
||||||
- glibc-langpack-el
|
# dnf group info GNOME
|
||||||
- glibc-langpack-fi
|
- gnome-session-wayland-session
|
||||||
- glibc-langpack-pt
|
- gnome-session-xsession
|
||||||
|
- gnome-settings-daemon
|
||||||
- name: Fetching GNOME installed-tests testing harness source from remote repository
|
- gnome-shell
|
||||||
git:
|
- polkit
|
||||||
repo: 'https://gitlab.gnome.org/GNOME/gnome-desktop-testing.git'
|
- NetworkManager-ssh-gnome
|
||||||
dest: gnome-desktop-testing
|
- PackageKit-command-not-found
|
||||||
force: yes
|
- PackageKit-gtk3-module
|
||||||
|
- adobe-source-code-pro-fonts
|
||||||
- name: Configure GNOME installed-tests testing harness build
|
- at-spi2-atk
|
||||||
command: ./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var
|
- at-spi2-core
|
||||||
args:
|
- glib-networking
|
||||||
chdir: gnome-desktop-testing
|
- gnome-backgrounds
|
||||||
|
- gnome-classic-session
|
||||||
- name: Build GNOME installed-tests testing harness
|
- gnome-clocks
|
||||||
command: make
|
- gnome-color-manager
|
||||||
args:
|
- gnome-contacts
|
||||||
chdir: gnome-desktop-testing
|
- gnome-font-viewer
|
||||||
|
- gnome-logs
|
||||||
- name: Install GNOME installed-tests testing harness
|
- gnome-maps
|
||||||
command: make install
|
- gnome-photos
|
||||||
args:
|
- gnome-remote-desktop
|
||||||
chdir: gnome-desktop-testing
|
- gnome-screenshot
|
||||||
|
- gnome-system-monitor
|
||||||
|
- gnome-terminal-nautilus
|
||||||
|
- gnome-themes-extra
|
||||||
|
- gnome-user-docs
|
||||||
|
- gnome-user-share
|
||||||
|
- gnome-weather
|
||||||
|
- gvfs-afc
|
||||||
|
- gvfs-afp
|
||||||
|
- gvfs-archive
|
||||||
|
- gvfs-fuse
|
||||||
|
- gvfs-goa
|
||||||
|
- gvfs-gphoto2
|
||||||
|
- gvfs-mtp
|
||||||
|
- gvfs-smb
|
||||||
|
- libcanberra-gtk3
|
||||||
|
- libcanberra-gtk3
|
||||||
|
- libproxy-webkitgtk4
|
||||||
|
- librsvg2
|
||||||
|
- libsane-hpaio
|
||||||
|
- mesa-dri-drivers
|
||||||
|
- mesa-libEGL
|
||||||
|
- orca
|
||||||
|
- rygel
|
||||||
|
- sane-backends-drivers-scanners
|
||||||
|
- simple-scan
|
||||||
|
- tracker
|
||||||
|
- tracker-miners
|
||||||
|
- xdg-desktop-portal
|
||||||
|
- xdg-desktop-portal-gtk
|
||||||
|
- xdg-user-dirs-gtk
|
||||||
|
|
||||||
- name: Start IBus installed-tests testing harness
|
- name: Start IBus installed-tests testing harness
|
||||||
environment:
|
environment:
|
||||||
@ -76,6 +95,12 @@
|
|||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
status="PASS: frame"
|
status="PASS: frame"
|
||||||
fi
|
fi
|
||||||
|
if [ -f /var/tmp/ibus-ci-autostart.log ] ; then
|
||||||
|
echo "#### /var/tmp/ibus-ci-autostart.log"
|
||||||
|
cat /var/tmp/ibus-ci-autostart.log
|
||||||
|
rm /var/tmp/ibus-ci-autostart.log
|
||||||
|
echo "#"
|
||||||
|
fi
|
||||||
echo "${status}" >> {{ remote_artifacts }}/test.log
|
echo "${status}" >> {{ remote_artifacts }}/test.log
|
||||||
echo "#### {{ remote_artifacts }}/{{ installed_test_name }}.log"
|
echo "#### {{ remote_artifacts }}/{{ installed_test_name }}.log"
|
||||||
if [ -f {{ remote_artifacts }}/{{ installed_test_name }}.log ] ; then
|
if [ -f {{ remote_artifacts }}/{{ installed_test_name }}.log ] ; then
|
||||||
|
@ -5,4 +5,10 @@
|
|||||||
tags:
|
tags:
|
||||||
- classic
|
- classic
|
||||||
- gating
|
- gating
|
||||||
|
required_packages:
|
||||||
|
- ibus-tests
|
||||||
|
# ibus-compose test needs locales
|
||||||
|
- glibc-langpack-el
|
||||||
|
- glibc-langpack-fi
|
||||||
|
- glibc-langpack-pt
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user