From 74e5e49dcabea3add4aa28af026c702bbb00e71a Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Aug 27 2020 05:49:02 +0000 Subject: test-reboot.yml: test.log is mandatory, improve results format According to https://docs.fedoraproject.org/en-US/ci/standard-test-interface/#_invocation every test must provide *test.log*. Improve *results.yml* format. Drop *avc.err.log* and log everything AVC denial related to *avc.log* --- diff --git a/tests/tests-reboot.yml b/tests/tests-reboot.yml index 44774a0..94ea8a5 100644 --- a/tests/tests-reboot.yml +++ b/tests/tests-reboot.yml @@ -33,9 +33,10 @@ shell: | result=pass dmesg | grep -i -e type=1300 -e type=1400 > /tmp/avc.log && result=fail - ausearch -m avc -m selinux_err -m user_avc -ts boot >> /tmp/avc.log 2> /tmp/avc.err.log - grep -q '' /tmp/avc.err.log || result=fail - echo -e "results:\n- test: reboot and collect AVC\n result: $result\n" > /tmp/results.yml + ausearch -m avc -m selinux_err -m user_avc -ts boot &>> /tmp/avc.log + grep -q '' /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: - name: Pull out the artifacts @@ -44,6 +45,6 @@ src: "{{ item }}" flat: yes with_items: + - /tmp/test.log - /tmp/avc.log - - /tmp/avc.err.log - /tmp/results.yml