From 58128c752866a248da576bb971402ac8f283fd84 Mon Sep 17 00:00:00 2001 From: Adam Samalik Date: Thu, 29 Jun 2023 18:10:37 +0200 Subject: [PATCH] re-import sources as agreed with the maintainer --- .gitignore | 100 ++++++++++++++++- .../defaults/main.yml | 35 ++++++ .../ibus-desktop-testing-role/meta/main.yml | 4 + .../ibus-desktop-testing-role/tasks/main.yml | 101 ++++++++++++++++++ tests/tests.yml | 8 ++ 5 files changed, 247 insertions(+), 1 deletion(-) 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 8842fb1..041fc00 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,100 @@ -SOURCES/ibus-typing-booster-2.1.0.tar.gz +/ibus-typing-booster-0.0.7.tar.gz +/ibus-typing-booster-0.0.8.tar.gz +/ibus-typing-booster-0.0.9.tar.gz +/ibus-typing-booster-0.0.10.tar.gz +/ibus-typing-booster-0.0.11.tar.gz +/ibus-typing-booster-0.0.12.tar.gz +/ibus-typing-booster-0.0.13.tar.gz +/ibus-typing-booster-0.0.14.tar.gz +/ibus-typing-booster-0.0.15.tar.gz +/ibus-typing-booster-0.0.16.tar.gz +/ibus-typing-booster-0.0.17.tar.gz +/ibus-typing-booster-0.0.18.tar.gz +/ibus-typing-booster-0.0.19.tar.gz +/ibus-typing-booster-0.0.20.tar.gz +/ibus-typing-booster-0.0.21.tar.gz +/ibus-typing-booster-0.0.22.tar.gz +/ibus-typing-booster-0.0.23.tar.gz +/ibus-typing-booster-0.0.24.tar.gz +/ibus-typing-booster-0.0.25.tar.gz +/ibus-typing-booster-0.0.26.tar.gz +/ibus-typing-booster-0.0.27.tar.gz +/ibus-typing-booster-0.0.28.tar.gz +/ibus-typing-booster-0.0.29.tar.gz +/ibus-typing-booster-0.0.30.tar.gz +/ibus-typing-booster-0.0.31.tar.gz +/ibus-typing-booster-0.0.32.tar.gz +/ibus-typing-booster-1.0.0.tar.gz +/ibus-typing-booster-1.0.1.tar.gz +/ibus-typing-booster-1.0.2.tar.gz +/ibus-typing-booster-1.0.3.tar.gz +/ibus-typing-booster-1.1.0.tar.gz +/ibus-typing-booster-1.2.0.tar.gz +/ibus-typing-booster-1.2.1.tar.gz +/ibus-typing-booster-1.2.2.tar.gz +/ibus-typing-booster-1.2.3.tar.gz +/ibus-typing-booster-1.2.4.tar.gz +/ibus-typing-booster-1.2.5.tar.gz +/ibus-typing-booster-1.2.6.tar.gz +/ibus-typing-booster-1.2.7.tar.gz +/ibus-typing-booster-1.2.8.tar.gz +/ibus-typing-booster-1.2.9.tar.gz +/ibus-typing-booster-1.2.10.tar.gz +/ibus-typing-booster-1.2.11.tar.gz +/ibus-typing-booster-1.2.12.tar.gz +/ibus-typing-booster-1.2.13.tar.gz +/ibus-typing-booster-1.2.14.tar.gz +/ibus-typing-booster-1.2.15.tar.gz +/ibus-typing-booster-1.3.0.tar.gz +/ibus-typing-booster-1.3.1.tar.gz +/ibus-typing-booster-1.4.0.tar.gz +/ibus-typing-booster-1.4.1.tar.gz +/ibus-typing-booster-1.4.2.tar.gz +/ibus-typing-booster-1.4.3.tar.gz +/ibus-typing-booster-1.4.4.tar.gz +/ibus-typing-booster-1.4.5.tar.gz +/ibus-typing-booster-1.4.6.tar.gz +/ibus-typing-booster-1.4.7.tar.gz +/ibus-typing-booster-1.4.8.tar.gz +/ibus-typing-booster-1.5.0.tar.gz +/ibus-typing-booster-1.5.1.tar.gz +/ibus-typing-booster-1.5.2.tar.gz +/ibus-typing-booster-1.5.3.tar.gz +/ibus-typing-booster-1.5.4.tar.gz +/ibus-typing-booster-1.5.5.tar.gz +/ibus-typing-booster-1.5.6.tar.gz +/ibus-typing-booster-1.5.7.tar.gz +/ibus-typing-booster-1.5.8.tar.gz +/ibus-typing-booster-1.5.9.tar.gz +/ibus-typing-booster-1.5.10.tar.gz +/ibus-typing-booster-1.5.11.tar.gz +/ibus-typing-booster-1.5.12.tar.gz +/ibus-typing-booster-1.5.13.tar.gz +/ibus-typing-booster-1.5.14.tar.gz +/ibus-typing-booster-1.5.15.tar.gz +/ibus-typing-booster-1.5.16.tar.gz +/ibus-typing-booster-1.5.17.tar.gz +/ibus-typing-booster-1.5.18.tar.gz +/ibus-typing-booster-1.5.19.tar.gz +/ibus-typing-booster-1.5.20.tar.gz +/ibus-typing-booster-1.5.21.tar.gz +/ibus-typing-booster-1.5.22.tar.gz +/ibus-typing-booster-1.5.23.tar.gz +/ibus-typing-booster-1.5.24.tar.gz +/ibus-typing-booster-1.5.25.tar.gz +/ibus-typing-booster-1.5.26.tar.gz +/ibus-typing-booster-1.5.27.tar.gz +/ibus-typing-booster-1.5.28.tar.gz +/ibus-typing-booster-1.5.29.tar.gz +/ibus-typing-booster-1.5.30.tar.gz +/ibus-typing-booster-1.5.31.tar.gz +/ibus-typing-booster-1.5.32.tar.gz +/ibus-typing-booster-1.5.33.tar.gz +/ibus-typing-booster-1.5.34.tar.gz +/ibus-typing-booster-1.5.35.tar.gz +/ibus-typing-booster-1.5.36.tar.gz +/ibus-typing-booster-1.5.37.tar.gz +/ibus-typing-booster-1.5.38.tar.gz +/ibus-typing-booster-2.0.0.tar.gz +/ibus-typing-booster-2.0.2.tar.gz /ibus-typing-booster-2.1.0.tar.gz 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..d1205f6 --- /dev/null +++ b/tests/roles/ibus-desktop-testing-role/defaults/main.yml @@ -0,0 +1,35 @@ +role_pkgs_req: + - rsync + - xorg-x11-server-Xvfb + - m17n-lib + - m17n-db-extras + - python3-enchant + - libappstream-glib + - desktop-file-utils + - python3-mock + - python3-gobject + - python3-gobject-base + - hunspell-cs + - hunspell-de + - hunspell-en + - hunspell-es + - 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 + - glibc-langpack-pt + - glibc-langpack-am + - glibc-langpack-de + - glibc-langpack-ar 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..599620b --- /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-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/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..4a7fba3 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,8 @@ +- hosts: localhost + roles: + - role: ibus-desktop-testing-role + installed_test_name: ibus-typing-booster + tags: + - classic + - gating +