From 3b0de74af7d0d47dce925c22457578fe093dcacc Mon Sep 17 00:00:00 2001 From: Adam Samalik Date: Thu, 29 Jun 2023 17:47:44 +0200 Subject: [PATCH] re-import sources as agreed with the maintainer --- .gitignore | 62 ++++++++++- .../defaults/main.yml | 3 + .../ibus-desktop-testing-role/meta/main.yml | 4 + .../ibus-desktop-testing-role/tasks/main.yml | 104 ++++++++++++++++++ tests/tests.yml | 8 ++ 5 files changed, 178 insertions(+), 3 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 91a8955..aa569fd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,60 @@ -SOURCES/ibus-1.5.19.tar.gz -SOURCES/ibus-po-1.5.19-20210706.tar.gz -/ibus-1.5.19.tar.gz +/cldr-emoji-annotation-30.0.3_2.tar.gz +/ibus-gjs-3.0.2.20110823.tar.gz +/ibus-gjs-3.1.4.20110823.tar.gz +/ibus-gjs-3.0.2.20110908.tar.gz +/ibus-gjs-3.1.91.20110908.tar.gz +/ibus-gjs-3.1.91.20110913.tar.gz +/ibus-gjs-3.0.2.20110928.tar.gz +/ibus-gjs-3.2.0.20110928.tar.gz +/ibus-gjs-3.0.2.20111018.tar.gz +/ibus-gjs-3.2.0.20111018.tar.gz +/ibus-gjs-3.2.1.20111021.tar.gz +/ibus-gjs-3.0.2.20111028.tar.gz +/ibus-gjs-3.2.1.20111028.tar.gz +/ibus-gjs-3.0.2.20111104.tar.gz +/ibus-gjs-3.2.1.20111104.tar.gz +/ibus-gjs-3.0.2.20111118.tar.gz +/ibus-gjs-3.2.1.20111118.tar.gz +/ibus-gjs-3.2.1.20111128.tar.gz +/ibus-gjs-3.2.1.20111230.tar.gz +/ibus-gjs-3.3.3.20120203.tar.gz +/ibus-gjs-3.3.90.20120308.tar.gz +/ibus-gjs-3.3.90.20120317.tar.gz +/ibus-gjs-3.3.92.20120327.tar.gz +/ibus-gjs-3.4.1.20120428.tar.gz +/ibus-gjs-3.4.1.20120518.tar.gz +/ibus-gjs-3.4.1.20120815.tar.gz +/ibus-gjs-3.4.1.20130115.tar.gz +/ibus-xkb-1.5.0.tar.gz +/ibus-xkb-1.5.0.20140114.tar.gz +/ibus-po-1.5.9-20141001.tar.gz +/ibus-po-1.5.10-20150402.tar.gz +/ibus-po-1.5.14-20160909.tar.gz +/ibus-po-1.5.17-20180221.tar.gz +/ibus-po-1.5.19-20180822.tar.gz /ibus-po-1.5.19-20210706.tar.gz +ibus-1.3.6.tar.gz +/ibus-1.3.7.tar.gz +/ibus-1.3.8.tar.gz +/ibus-1.3.9.tar.gz +/ibus-1.4.0.tar.gz +/ibus-1.4.1.tar.gz +/ibus-1.5.1.tar.gz +/ibus-1.5.2.tar.gz +/ibus-1.5.3.tar.gz +/ibus-1.5.4.tar.gz +/ibus-1.5.5.tar.gz +/ibus-1.5.6.tar.gz +/ibus-1.5.7.tar.gz +/ibus-1.5.8.tar.gz +/ibus-1.5.9.tar.gz +/ibus-1.5.10.tar.gz +/ibus-1.5.11.tar.gz +/ibus-1.5.12.tar.gz +/ibus-1.5.13.tar.gz +/ibus-1.5.14.tar.gz +/ibus-1.5.15.tar.gz +/ibus-1.5.16.tar.gz +/ibus-1.5.17.tar.gz +/ibus-1.5.18.tar.gz +/ibus-1.5.19.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..8ff7991 --- /dev/null +++ b/tests/roles/ibus-desktop-testing-role/defaults/main.yml @@ -0,0 +1,3 @@ +role_pkgs_req: + - rsync + - xorg-x11-server-Xvfb 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..4b83510 --- /dev/null +++ b/tests/roles/ibus-desktop-testing-role/tasks/main.yml @@ -0,0 +1,104 @@ +--- +- 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-tests + # ibus-compose test needs locales + - glibc-langpack-el + - glibc-langpack-fi + - glibc-langpack-pt + + - 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 tests + shell: | + set -e + status="FAIL: frame" + ibus-desktop-testing-runner \ + --no-graphics \ + --runner=gnome \ + --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..8282772 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,8 @@ +- hosts: localhost + roles: + - role: ibus-desktop-testing-role + installed_test_name: ibus + tags: + - classic + - gating +