ttmkfdir/tests/tests.yml
Troy Dawson fc0c1b6912 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/ttmkfdir#d262c415c7e6a3375d2b3a6df54e10ded78f9abc
2020-10-15 13:05:59 -07:00

35 lines
906 B
YAML

- hosts: localhost
vars:
- artifacts: "{{ lookup('env', 'TEST_ARTIFACTS')|default('./artifacts', true) }}"
tags:
- classic
remote_user: root
tasks:
- name: Install required packages
dnf:
name:
- sazanami*fonts
- xorg-x11-fonts-misc
- name: Install the test files
copy: src={{ item.file }} dest=/usr/local/bin/{{ item.dest }} mode=0755
with_items:
- {file: test-simple, dest: test-simple }
- name: Test block
block:
- name: Execute the tests
shell: |
/usr/local/bin/test-simple &> /tmp/test.log && result=pass || result=fail
echo -e "results:\n- {result: $result, test: simple}" > /tmp/results.yml
always:
- name: Pull out the logs
fetch:
dest: "{{ artifacts }}/"
src: "{{ item }}"
flat: yes
with_items:
- /tmp/test.log
- /tmp/results.yml