From 74e5e49dcabea3add4aa28af026c702bbb00e71a Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Wed, 26 Aug 2020 17:34:24 +0200 Subject: [PATCH] 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* --- tests/tests-reboot.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/tests-reboot.yml b/tests/tests-reboot.yml index 44774a03..94ea8a51 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