dbf3e07f86
The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/squashfs-tools#c671752333838c266337705c1a0c09213ca1c4e7
31 lines
993 B
YAML
31 lines
993 B
YAML
---
|
|
- hosts: localhost
|
|
vars:
|
|
- artifacts: "{{ lookup('env', 'TEST_ARTIFACTS')|default('./artifacts', true) }}"
|
|
tags:
|
|
- classic
|
|
remote_user: root
|
|
tasks:
|
|
- name: Add extra required packages
|
|
dnf:
|
|
name: rpmdevtools, kernel-modules-{{ ansible_kernel }}
|
|
- name: Install the test files
|
|
copy: src={{ item.file }} dest=/usr/local/bin/{{ item.dest }} mode=0755
|
|
with_items:
|
|
- {file: Squashfs-compression-test.sh, dest: Squashfs-compression-test.sh }
|
|
- name: Test block
|
|
block:
|
|
- name: Execute the tests
|
|
shell: |
|
|
(/usr/local/bin/Squashfs-compression-test.sh &> /tmp/test.log); grep -iq failed /tmp/test.log && result=fail || result=pass
|
|
echo -e "results:\n- {result: $result, test: working}" > /tmp/results.yml
|
|
always:
|
|
- name: Pull out the logs
|
|
fetch:
|
|
dest: "{{ artifacts }}/"
|
|
src: "{{ item }}"
|
|
flat: yes
|
|
with_items:
|
|
- /tmp/test.log
|
|
- /tmp/results.yml
|