squashfs-tools/tests/test_working.yml
Bruno Wolff III 60cf0845ea Keep setup output out of test.log
It looks like the command that gets run covers more than the test script.
We need to keep that other output out of the output we search for
failure. The includes the dnf step, since it can have non fatal failures.
It also looks like the dnf step might need kernel-modules-extra for
mounting squashfs file systems.
2019-05-22 04:47:43 -05:00

26 lines
850 B
YAML

---
- hosts: localhost
tags:
- classic
remote_user: root
tasks:
- 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: |
dnf install -y --nogpgcheck kernel-modules-extra rpmdevtools; (/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: "../../logs/"
src: "{{ item }}"
flat: yes
with_items:
- /tmp/test.log
- /tmp/results.yml