Yet more ansible hackery: create results.yml

Gating tests are still failing. Actually, the BATS portion is
all passing, it just seems to be the end part (infrastructure)
that fails. Let's try creating a results.yml file.

Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
Ed Santiago 2020-05-12 06:38:17 -06:00
parent 869e93d116
commit 712ba62553
2 changed files with 17 additions and 10 deletions

View File

@ -46,18 +46,22 @@
- summary - summary
# Collect all the one-line PASS/FAIL results in one file, test.log # Collect all the one-line PASS/FAIL results in one file, test.log
# Write the same thing, in a different format, to results.yml
# https://docs.fedoraproject.org/en-US/ci/standard-test-interface/
- name: "{{ test.name }} | keep running tally of test results" - name: "{{ test.name }} | keep running tally of test results"
local_action: shell cat "{{ artifacts }}/test.{{ test_name_oneword }}.summary.log" >>"{{ artifacts }}/test.log" local_action:
module: shell
cmd: |
cd {{ artifacts }}
cat "test.{{ test_name_oneword }}.summary.log" >>test.log
# ...then delete the oneliner file, to keep things clean. status=$(awk '{print $1}' <test.{{ test_name_oneword }}.summary.log | tr A-Z a-z)
- name: "{{ test.name }} | clean up status file" echo "- test: {{ test.name }}" >>results.yml
local_action: file dest="{{ artifacts }}/test.{{ test_name_oneword }}.summary.log" state=absent echo " result: $status" >>results.yml
echo " logs: test.{{ test_name_oneword }}.bats.log" >>results.yml
# FIXME: do the same with results.yml: # delete the oneliner file, to keep artifacts dir clean
# - test: {{ test.name }} rm -f test.{{ test_name_oneword }}.summary.log
# result: pass or fail
# logs:
# - test.{{ test_name_oneword }}.bats.log
- name: "{{ test.name }} | remove remote logs and helpers" - name: "{{ test.name }} | remove remote logs and helpers"
file: file:

View File

@ -17,9 +17,12 @@
- name: remove stale log files - name: remove stale log files
local_action: shell rm -f {{ artifacts }}/test*.log local_action: shell rm -f {{ artifacts }}/test*.log
- name: clear test results - name: clear test results (test.log)
local_action: command truncate --size=0 {{ artifacts }}/test.log local_action: command truncate --size=0 {{ artifacts }}/test.log
- name: clear test results (results.yml)
local_action: copy content="requires:\n" dest={{ artifacts }}/results.yml
# These are the actual tests: set cgroups vN, then run root/rootless tests. # These are the actual tests: set cgroups vN, then run root/rootless tests.
- name: set cgroups and run podman tests - name: set cgroups and run podman tests
include_tasks: test_podman_cgroups_vn.yml include_tasks: test_podman_cgroups_vn.yml