squashfs-tools/tests/test_working.yml
2019-05-22 15:36:03 -05:00

32 lines
975 B
YAML

---
- hosts: localhost
tags:
- classic
remote_user: root
tasks:
- name: Add extra required packages
dnf:
name: rpmdevtools
state: latest
name: kernel-modules
state: latest
- 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: |
modprobe squashfs; cat /proc/filesystems; lsmod; (/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