86 lines
2.6 KiB
YAML
86 lines
2.6 KiB
YAML
---
|
|
- 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 GNOME installed-tests testing harness
|
|
package:
|
|
name:
|
|
- git
|
|
- make
|
|
- gcc
|
|
- diffutils
|
|
- autoconf
|
|
- automake
|
|
- libtool
|
|
- glib2-devel
|
|
- systemd-devel
|
|
|
|
- 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: Create a user to run GNOME installed-tests as
|
|
user:
|
|
name: shadowman
|
|
state: present
|
|
|
|
- name: Start GNOME installed-tests testing harness
|
|
block:
|
|
- name: Allow shadowman user access to artifacts dir
|
|
file:
|
|
path: "{{ remote_artifacts }}"
|
|
mode: 01777
|
|
|
|
- name: Execute tests
|
|
become: yes
|
|
become_user: shadowman
|
|
shell: |
|
|
set -e
|
|
log_file="{{ remote_artifacts }}/{{ installed_test_name }}.log"
|
|
exec 2>>$log_file 1>>$log_file
|
|
status="FAIL"
|
|
dbus-run-session xvfb-run -a -s '-screen 0 1024x768x24' env TMPDIR='{{ remote_artifacts }}' G_MESSAGES_DEBUG='all' gnome-desktop-testing-runner '{{ installed_test_name }}'
|
|
if [ $? -eq 0 ]; then
|
|
status="PASS"
|
|
fi
|
|
echo "${status} $TEST" >> {{ remote_artifacts }}/test.log
|
|
args:
|
|
chdir: "{{ remote_artifacts }}"
|
|
|
|
- name: Check the results
|
|
shell: grep "^FAIL" {{ remote_artifacts }}/test.log
|
|
register: test_fails
|
|
failed_when: False
|
|
|
|
- name: Set role result
|
|
set_fact:
|
|
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
|
|
|