From fb724305547b8066be25e9f2c1fe0d58583e1f06 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Nov 22 2023 06:14:02 +0000 Subject: [PATCH 1/2] Revert "Update CI tests" This reverts commit a094f605a5a681834f5d1999bcc0176ab635fd56. --- diff --git a/tests/roles/ibus-desktop-testing-role/files/check-results.sh b/tests/roles/ibus-desktop-testing-role/files/check-results.sh deleted file mode 100755 index 1160dac..0000000 --- a/tests/roles/ibus-desktop-testing-role/files/check-results.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash - -TEST_LOG="test.log" -TEST_RUN_IN_RAWHIDE="1" - -if [ $# -gt 0 ] ; then - TEST_LOG="$1" - TEST_RUN_IN_RAWHIDE="$2" -fi - -gen_results() -{ - TEST_RUNTIME="$1" - TEST_STATUS="$2" - TEST_STATUS_UPPER="$(echo "$TEST_STATUS" | tr '[:lower:]' '[:upper:]')" - cat > results.xml << _EOF -results: - -- test: results - result: $TEST_STATUS - runtime: $TEST_RUNTIME - logs: - - ${TEST_STATUS_UPPER}-str_results.log - -_EOF - - DIR=$(dirname "$TEST_LOG") - if [ x"$TEST_LOG" != x ] ; then - cp "$TEST_LOG" "$DIR/${TEST_STATUS_UPPER}-str_results.log" - else - touch "$DIR/${TEST_STATUS_UPPER}-str_results.log" - fi - if [ x"$DIR" != x. ] ; then - mv results.xml "$DIR" - fi -} - -if [ $TEST_RUN_IN_RAWHIDE -eq 0 ] ; then - IS_RAWHIDE="$(grep -i rawhide /etc/fedora-release)" - if [ x"$IS_RAWHIDE" != x ] ; then - gen_results "0" "pass" - exit 0 - fi -fi -if [ ! -f $TEST_LOG ] ; then - gen_results "0" "fail" - echo ERROR -else - FAIL="$(grep "^FAIL: " $TEST_LOG | grep -v 'FAIL: 0$')" - RUNTIME_FAIL="$(grep -v 'frame' $TEST_LOG | grep "^FAIL: " | sed -e "s/FAIL: //")" - RUNTIME_PASS="$(grep -v 'frame' $TEST_LOG | grep "^PASS: " | sed -e "s/PASS: //")" - if [ x"$RUNTIME_FAIL" = x ] ; then - RUNTIME_FAIL="0" - fi - if [ x"$RUNTIME_PASS" = x ] ; then - RUNTIME_PASS="0" - fi - RUNTIME="$(expr $RUNTIME_FAIL + $RUNTIME_PASS)" - if [ x"$FAIL" != x ] ; then - gen_results "$RUNTIME" "fail" - echo ERROR - else - gen_results "$RUNTIME" "pass" - fi -fi - diff --git a/tests/roles/ibus-desktop-testing-role/tasks/main.yml b/tests/roles/ibus-desktop-testing-role/tasks/main.yml index b8da5f2..af39205 100644 --- a/tests/roles/ibus-desktop-testing-role/tasks/main.yml +++ b/tests/roles/ibus-desktop-testing-role/tasks/main.yml @@ -11,104 +11,43 @@ - name: Installing build dependencies for IBus and GNOME installed-tests testing harness package: name: - # IBus CI sets + - 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 - - dbus-x11 - - gnome-desktop-testing - - gnome-screenshot - # https://pagure.io/fedora-comps/blob/main/f/comps-f38.xml.in - # dnf group info GNOME - # mandatory - - dconf - - gdm - - gnome-boxes - - gnome-connections - - gnome-control-center - - gnome-initial-setup - - gnome-session-wayland-session - - gnome-session-xsession - - gnome-settings-daemon - - gnome-shell - - gnome-software - - gnome-terminal - - gnome-text-editor - - nautilus - - polkit - - yelp - # default - - adobe-source-code-pro-fonts - - at-spi2-atk - - at-spi2-core - - avahi - - baobab - - cheese - # Sometimes version mismatch with gnome-shell in rawhide - #- chrome-gnome-shell - - eog - - evince - - evince-djvu - - fprintd-pam - - glib-networking - - gnome-backgrounds - - gnome-bluetooth - - gnome-calculator - - gnome-characters - - gnome-classic-session - - gnome-clocks - - gnome-color-manager - - gnome-contacts - - gnome-disk-utility - - gnome-font-viewer - - gnome-logs - - gnome-maps - - gnome-photos - - gnome-remote-desktop - - 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 - - libproxy-duktape - - librsvg2 - - libsane-hpaio - - mesa-dri-drivers - - mesa-libEGL - - ModemManager - - NetworkManager-adsl - - NetworkManager-openconnect-gnome - - NetworkManager-openvpn-gnome - - NetworkManager-ppp - - NetworkManager-pptp-gnome - - NetworkManager-ssh-gnome - - NetworkManager-vpnc-gnome - - NetworkManager-wwan - - orca - - PackageKit-command-not-found - - PackageKit-gtk3-module - - rygel - - sane-backends-drivers-scanners - - simple-scan - - sushi - - systemd-oomd-defaults - - totem - - tracker - - tracker-miners - - xdg-desktop-portal - - xdg-desktop-portal-gnome - - xdg-desktop-portal-gtk - - xdg-user-dirs-gtk + - ibus-hangul-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: @@ -117,7 +56,7 @@ G_MESSAGES_DEBUG: 'all' LANG: 'C.UTF-8' block: - - name: Execute IBus tests + - name: Execute IBus hangul tests shell: | set -e # Delete LC_CTYPE=C.UTF-8 @@ -133,12 +72,6 @@ if [ $? -eq 0 ]; then status="PASS: frame" 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 "#### {{ remote_artifacts }}/{{ installed_test_name }}.log" if [ -f {{ remote_artifacts }}/{{ installed_test_name }}.log ] ; then @@ -152,7 +85,20 @@ echo "#" - name: Check the results - script: check-results.sh "{{ remote_artifacts }}/test.log" "0" + shell: | + IS_RAWHIDE=`grep -i rawhide /etc/fedora-release` + if [ x"$IS_RAWHIDE" != x ] ; then + exit 0 + fi + log="{{ remote_artifacts }}/test.log" + if [ ! -f $log ] ; then + echo ERROR + else + FAIL=`grep "^FAIL: " $log | grep -v 'FAIL: 0$'` + if [ x"$FAIL" != x ] ; then + echo ERROR + fi + fi register: test_fails failed_when: False diff --git a/tests/tests.yml b/tests/tests.yml index e387c66..446779e 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -5,6 +5,4 @@ tags: - classic - gating - required_packages: - - ibus-hangul-tests From 7a5eaf3bd75f39bac0ea7f84d6634c7f40a26369 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Nov 22 2023 06:16:10 +0000 Subject: [PATCH 2/2] Run CI tests --- diff --git a/tests/roles/ibus-desktop-testing-role/tasks/main.yml b/tests/roles/ibus-desktop-testing-role/tasks/main.yml index af39205..f2f6adc 100644 --- a/tests/roles/ibus-desktop-testing-role/tasks/main.yml +++ b/tests/roles/ibus-desktop-testing-role/tasks/main.yml @@ -34,6 +34,11 @@ dest: gnome-desktop-testing force: yes + - name: Checkout v2021.1 tag in GNOME installed-tests testing harness + command: git checkout -b v2021.1 refs/tags/v2021.1 + args: + chdir: gnome-desktop-testing + - name: Configure GNOME installed-tests testing harness build command: ./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var args: