diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..648918d --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/ibus-typing-booster.spec b/ibus-typing-booster.spec index 5c56ca6..6f6c181 100644 --- a/ibus-typing-booster.spec +++ b/ibus-typing-booster.spec @@ -1,6 +1,6 @@ Name: ibus-typing-booster Version: 2.11.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A completion input method License: GPLv3+, ASL 2.0 URL: https://mike-fabian.github.io/ibus-typing-booster/ @@ -199,14 +199,6 @@ if [ $rc != 0 ] ; then exit $rc fi -%post -[ -x %{_bindir}/ibus ] && \ - %{_bindir}/ibus write-cache --system &>/dev/null || : - -%postun -[ -x %{_bindir}/ibus ] && \ - %{_bindir}/ibus write-cache --system &>/dev/null || : - %files -f %{name}.lang %doc AUTHORS COPYING README README.html README.md %{_datadir}/%{name} @@ -237,6 +229,10 @@ fi %{_datadir}/applications/emoji-picker.desktop %changelog +* Wed Jun 30 2021 Mike FABIAN - 2.11.0-3 +- Resolves: rhbz#1974636 Delete ibus write-cache in scriptlet +- Improve CI tests and add gating.yaml + * Fri Apr 16 2021 Mohan Boddu - 2.11.0-2 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 diff --git a/plans/basic.fmf b/plans/basic.fmf new file mode 100644 index 0000000..574bc78 --- /dev/null +++ b/plans/basic.fmf @@ -0,0 +1,9 @@ +summary: Basic smoke test +discover: + how: fmf +execute: + how: tmt +prepare: + how: shell + script: + - dnf config-manager --enable rhel-CRB --enable rhel-buildroot diff --git a/tests/roles/ibus-desktop-testing-role/defaults/main.yml b/tests/main.fmf similarity index 54% rename from tests/roles/ibus-desktop-testing-role/defaults/main.yml rename to tests/main.fmf index 0846ba9..10c10d7 100644 --- a/tests/roles/ibus-desktop-testing-role/defaults/main.yml +++ b/tests/main.fmf @@ -1,8 +1,30 @@ -role_pkgs_req: - - gnome-desktop-testing - - ibus-desktop-testing - - rsync +test: ./runtest.sh +duration: 50m +framework: beakerlib +require: + # This stuff is only needed if gnome-desktop-testing + # cannot be required as a package and needs to be cloned + # from the git repo and build from source: + - git + - make + - gcc + - diffutils + - autoconf + - automake + - libtool + - glib2-devel + - systemd-devel + # Other requirements: + - gnome-session + - gnome-shell + - dbus-x11 - xorg-x11-server-Xvfb + - ibus + - ibus-devel + - ibus-desktop-testing + - ibus-typing-booster + - ibus-typing-booster-tests + - rsync - m17n-lib - m17n-db-extras - python3-enchant @@ -17,16 +39,9 @@ role_pkgs_req: - hunspell-fr - hunspell-it - hunspell-ko - - glib2 - - gtk3 - dconf - - dbus-x11 - - ibus - - ibus-devel - - gcc - python3-devel - python3-pyxdg - - xorg-x11-server-Xvfb - glibc-langpack-en - glibc-langpack-cs - glibc-langpack-km @@ -34,3 +49,6 @@ role_pkgs_req: - glibc-langpack-am - glibc-langpack-de - glibc-langpack-ar +recommend: + # this is not available on RHEL9 + - gnome-desktop-testing diff --git a/tests/roles/ibus-desktop-testing-role/meta/main.yml b/tests/roles/ibus-desktop-testing-role/meta/main.yml deleted file mode 100644 index 6626402..0000000 --- a/tests/roles/ibus-desktop-testing-role/meta/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- - -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 deleted file mode 100644 index 599620b..0000000 --- a/tests/roles/ibus-desktop-testing-role/tasks/main.yml +++ /dev/null @@ -1,101 +0,0 @@ ---- -- 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 IBus and 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-typing-booster-tests - - - 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 IBus installed-tests testing harness - environment: - ANSIBLE: 1 - TMPDIR: '{{ remote_artifacts }}' - G_MESSAGES_DEBUG: 'all' - block: - - name: Execute IBus typing booster tests - shell: | - set -e - status="FAIL: frame" - ibus-desktop-testing-runner \ - --no-graphics \ - --runner=gnome \ - --timeout=1200 \ - --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: | - log="{{ remote_artifacts }}/test.log" - if [ ! -f $log ] ; then - echo ERROR - exit 1 - else - FAIL=`grep "^FAIL: " $log | grep -v 'FAIL: 0$'` - if [ x"$FAIL" != x ] ; then - echo ERROR - exit 1 - 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/runtest.sh b/tests/runtest.sh new file mode 100755 index 0000000..5e62cae --- /dev/null +++ b/tests/runtest.sh @@ -0,0 +1,47 @@ +#!/bin/bash +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +NAME=ibus-typing-booster + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm ${NAME} + rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" + rlRun "pushd $tmp" + if ! rlCheckRpm gnome-desktop-testing; then + echo "gnome-desktop-testing is not available." + echo "Trying to download and compile it:" + git clone https://gitlab.gnome.org/GNOME/gnome-desktop-testing.git + pushd gnome-desktop-testing + ./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var + make + make install + popd + fi + rlPhaseEnd + + rlPhaseStartTest + rlRun "ibus-desktop-testing-runner \ + --no-graphics \ + --runner=gnome \ + --timeout=1500 \ + --tests=${NAME} \ + --output=${NAME}.log \ + --result=test.log \ + " 0 "Running ${NAME} tests" + echo "==== ${NAME}.log: ====" + cat ${NAME}.log + echo "==== EOF ${NAME}.log: ====" + echo "==== test.log ====" + cat test.log + echo "==== EOF test.log: ====" + rlAssertNotGrep FAIL test.log + rlFileSubmit ${NAME}.log + rlFileSubmit test.log + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $tmp" 0 "Remove tmp directory" + rlPhaseEnd +rlJournalEnd diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 4a7fba3..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,8 +0,0 @@ -- hosts: localhost - roles: - - role: ibus-desktop-testing-role - installed_test_name: ibus-typing-booster - tags: - - classic - - gating -