squashfs-tools/tests/test_working.yml

30 lines
943 B
YAML
Raw Normal View History

---
2019-05-21 17:39:33 +00:00
- hosts: localhost
tags:
- classic
remote_user: root
tasks:
2019-05-22 17:05:04 +00:00
- name: Add extra required packages
dnf:
name: rpmdevtools 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: |
2019-05-22 20:13:00 +00:00
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