diff --git a/tests/roles/ibus-desktop-testing-role/files/check-results.sh b/tests/roles/ibus-desktop-testing-role/files/check-results.sh index 1160dac..8a46118 100755 --- a/tests/roles/ibus-desktop-testing-role/files/check-results.sh +++ b/tests/roles/ibus-desktop-testing-role/files/check-results.sh @@ -1,11 +1,13 @@ #!/bin/bash TEST_LOG="test.log" -TEST_RUN_IN_RAWHIDE="1" +TEST_RUN_IN_RAWHIDE=1 + +declare -i TEST_RUN_IN_RAWHIDE if [ $# -gt 0 ] ; then TEST_LOG="$1" - TEST_RUN_IN_RAWHIDE="$2" + TEST_RUN_IN_RAWHIDE=$2 fi gen_results() @@ -15,7 +17,6 @@ gen_results() TEST_STATUS_UPPER="$(echo "$TEST_STATUS" | tr '[:lower:]' '[:upper:]')" cat > results.xml << _EOF results: - - test: results result: $TEST_STATUS runtime: $TEST_RUNTIME @@ -39,12 +40,13 @@ 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" + echo -n PASS exit 0 fi fi if [ ! -f $TEST_LOG ] ; then gen_results "0" "fail" - echo ERROR + echo -n ERROR else FAIL="$(grep "^FAIL: " $TEST_LOG | grep -v 'FAIL: 0$')" RUNTIME_FAIL="$(grep -v 'frame' $TEST_LOG | grep "^FAIL: " | sed -e "s/FAIL: //")" @@ -58,9 +60,10 @@ else RUNTIME="$(expr $RUNTIME_FAIL + $RUNTIME_PASS)" if [ x"$FAIL" != x ] ; then gen_results "$RUNTIME" "fail" - echo ERROR + echo -n ERROR else gen_results "$RUNTIME" "pass" + echo -n 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 d4af8a1..753384d 100644 --- a/tests/roles/ibus-desktop-testing-role/tasks/main.yml +++ b/tests/roles/ibus-desktop-testing-role/tasks/main.yml @@ -1,14 +1,12 @@ --- -- 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: Check if Fedora desktop + register: fedora_desktop + stat: + path: "/etc/fedora-release" - 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 + - name: Installing common GNOME desktop components package: name: # IBus CI sets @@ -16,14 +14,11 @@ - 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 @@ -36,44 +31,30 @@ - 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 @@ -87,28 +68,94 @@ - 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 + - name: Installing Fedora specific GNOME desktop components + when: fedora_desktop.stat.exists == true + package: + name: + - gnome-screenshot + - gnome-boxes + - yelp + - cheese + - eog + - evince-djvu + - gnome-backgrounds + - gnome-contacts + - gnome-maps + - gnome-photos + - gnome-themes-extra + - gnome-user-share + - gnome-weather + - gvfs-afc + - gvfs-afp + - gvfs-archive + - NetworkManager-openconnect-gnome + - NetworkManager-openvpn-gnome + - NetworkManager-pptp-gnome + - NetworkManager-ssh-gnome + - NetworkManager-vpnc-gnome + - rygel + - simple-scan + - sushi + - totem + - name: Installing GNOME installed-tests testing harness + when: fedora_desktop.stat.exists == true + package: + name: + - gnome-desktop-testing + - name: Installing build environment + when: fedora_desktop.stat.exists == false + package: + name: + - autoconf + - automake + - make + - gcc + - git + - libtool + + - name: Fetching GNOME installed-tests testing harness source from remote repository + when: fedora_desktop.stat.exists == false + git: + repo: 'https://gitlab.gnome.org/GNOME/gnome-desktop-testing.git' + dest: gnome-desktop-testing + force: yes + + - name: Checkout v2021.1 tag in GNOME installed-tests testing harness + when: fedora_desktop.stat.exists == false + command: git checkout -b v2021.1 refs/tags/v2021.1 + args: + chdir: gnome-desktop-testing + + - name: Configure GNOME installed-tests testing harness build + when: fedora_desktop.stat.exists == false + command: ./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var + args: + chdir: gnome-desktop-testing + + - name: Build GNOME installed-tests testing harness + when: fedora_desktop.stat.exists == false + command: make + args: + chdir: gnome-desktop-testing + + - name: Install GNOME installed-tests testing harness + when: fedora_desktop.stat.exists == false + command: make install + args: + chdir: gnome-desktop-testing - name: Start IBus installed-tests testing harness environment: @@ -161,7 +208,7 @@ - name: Check the results script: check-results.sh "{{ remote_artifacts }}/test.log" "0" register: test_fails - failed_when: False + failed_when: '"ERROR" in test_fails.stdout' - name: Set role result set_fact: