Improve tests structure
- rename test-reboot.yml to tests-reboot.yml so that it's run by CI directly - drop unnecessary tests.yml - add mandatory test.log, see https://docs.fedoraproject.org/en-US/ci/standard-test-interface/#_invocation - improve results.yml format - drop avc.err.log and log everything AVC related to avc.log
This commit is contained in:
parent
98b9113655
commit
16c37db4fd
@ -31,9 +31,12 @@
|
|||||||
|
|
||||||
- name: Gather SELinux denials since boot
|
- name: Gather SELinux denials since boot
|
||||||
shell: |
|
shell: |
|
||||||
ausearch -m avc -m selinux_err -m user_avc -ts boot > /tmp/avc.log 2> /tmp/avc.err.log
|
result=pass
|
||||||
grep -q '<no matches>' /tmp/avc.err.log && result=pass || result=fail
|
dmesg | grep -i -e type=1300 -e type=1400 > /tmp/avc.log && result=fail
|
||||||
echo -e "results:\n- {result: $result, test: reboot}" > /tmp/results.yml
|
ausearch -m avc -m selinux_err -m user_avc -ts boot &>> /tmp/avc.log
|
||||||
|
grep -q '<no matches>' /tmp/avc.log || result=fail
|
||||||
|
echo -e "\nresults:\n- test: reboot and collect AVC\n result: $result\n logs:\n - avc.log\n\n" > /tmp/results.yml
|
||||||
|
( [ $result = "pass" ] && echo PASS test-reboot || echo FAIL test-reboot ) > /tmp/test.log
|
||||||
|
|
||||||
always:
|
always:
|
||||||
- name: Pull out the artifacts
|
- name: Pull out the artifacts
|
||||||
@ -42,6 +45,6 @@
|
|||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
flat: yes
|
flat: yes
|
||||||
with_items:
|
with_items:
|
||||||
|
- /tmp/test.log
|
||||||
- /tmp/avc.log
|
- /tmp/avc.log
|
||||||
- /tmp/avc.err.log
|
|
||||||
- /tmp/results.yml
|
- /tmp/results.yml
|
@ -1 +0,0 @@
|
|||||||
- import_playbook: test-reboot.yml
|
|
Loading…
Reference in New Issue
Block a user