From cabcf62886ac248f6e4b7303cde45094bba61cf4 Mon Sep 17 00:00:00 2001 From: Adam Samalik Date: Tue, 18 Jul 2023 12:02:02 +0200 Subject: [PATCH] re-import sources as agreed with the maintainer --- .gitignore | 13 ++- ibus-table-chinese.spec | 6 +- .../defaults/main.yml | 23 ++++ .../ibus-desktop-testing-role/meta/main.yml | 4 + .../ibus-desktop-testing-role/tasks/main.yml | 101 ++++++++++++++++++ tests/tests.yml | 8 ++ 6 files changed, 153 insertions(+), 2 deletions(-) create mode 100644 tests/roles/ibus-desktop-testing-role/defaults/main.yml create mode 100644 tests/roles/ibus-desktop-testing-role/meta/main.yml create mode 100644 tests/roles/ibus-desktop-testing-role/tasks/main.yml create mode 100644 tests/tests.yml diff --git a/.gitignore b/.gitignore index 6387ed8..dcfb01d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,13 @@ -SOURCES/ibus-table-chinese-1.8.2-Source.tar.gz +/ibus-table-chinese-1.3.0.20101201-Source.tar.gz +/ibus-table-chinese-1.3.0.20101206-Source.tar.gz +/ibus-table-chinese-1.3.0.20110114-Source.tar.gz +/ibus-table-chinese-1.3.4-Source.tar.gz +/ibus-table-chinese-1.3.5-Source.tar.gz +/ibus-table-chinese-1.4.0-Source.tar.gz +/ibus-table-chinese-1.4.2-Source.tar.gz +/ibus-table-chinese-1.4.4-Source.tar.gz +/ibus-table-chinese-1.4.5-Source.tar.gz +/ibus-table-chinese-1.4.6-Source.tar.gz +/ibus-table-chinese-1.8.0-Source.tar.gz +/ibus-table-chinese-1.8.1-Source.tar.gz /ibus-table-chinese-1.8.2-Source.tar.gz diff --git a/ibus-table-chinese.spec b/ibus-table-chinese.spec index 40a5a5b..7e32789 100644 --- a/ibus-table-chinese.spec +++ b/ibus-table-chinese.spec @@ -4,7 +4,7 @@ %global createdb ibus-table-createdb Name: ibus-table-chinese Version: 1.8.2 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Chinese input tables for IBus Summary(zh_CN): 中文码表输入法 Summary(zh_TW): 中文碼表輸入法 @@ -541,6 +541,10 @@ rm -fr %{buildroot}%{_docdir}/* %{ibus_tables_dir}/yong.db %changelog +* Wed Feb 10 2021 Mike FABIAN - 1.8.2-10 +- Add gating tests to ibus-table-chinese +- Resolves: rhbz#1682162 + * Wed Feb 07 2018 Fedora Release Engineering - 1.8.2-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild 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..fbf44eb --- /dev/null +++ b/tests/roles/ibus-desktop-testing-role/defaults/main.yml @@ -0,0 +1,23 @@ +role_pkgs_req: + - rsync + - xorg-x11-server-Xvfb + - libappstream-glib + - desktop-file-utils + - python3-mock + - python3-gobject + - python3-gobject-base + - glib2 + - gtk3 + - dconf + - dbus-x11 + - ibus + - ibus-devel + - gcc + - python3-devel + - python3-pyxdg + - xorg-x11-server-Xvfb + - ibus-table + - ibus-table-tests + - ibus-table-chinese-wubi-jidian + - ibus-table-chinese-cangjie + - ibus-table-chinese-stroke5 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..a958379 --- /dev/null +++ b/tests/roles/ibus-desktop-testing-role/tasks/main.yml @@ -0,0 +1,101 @@ +--- +- 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-table-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 table 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/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..08966a8 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,8 @@ +- hosts: localhost + roles: + - role: ibus-desktop-testing-role + installed_test_name: ibus-table + tags: + - classic + - gating +