d55c8d8f5a
This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/podman.git#3f2f50cda9c6dd6e86824f7b944944c20946fd6f
37 lines
1005 B
YAML
37 lines
1005 B
YAML
---
|
|
# Copied from standard-test-basic
|
|
# ...and, 2020-05-13, updated, looks like they changed the whole thing around
|
|
- name: Check the results
|
|
local_action:
|
|
module: shell
|
|
cmd: |
|
|
log="{{ artifacts }}/test.log"
|
|
if [ ! -f "$log" ]; then
|
|
echo ERROR
|
|
echo "Test results not found." 1>&2
|
|
elif grep ^ERROR "$log" 1>&2; then
|
|
echo ERROR
|
|
elif grep ^FAIL "$log" 1>&2; then
|
|
echo FAIL
|
|
elif grep -q ^PASS "$log"; then
|
|
echo PASS
|
|
else
|
|
echo ERROR
|
|
echo "No test results found." 1>&2
|
|
fi
|
|
register: test_results
|
|
|
|
- name: Set role result
|
|
set_fact:
|
|
role_result: "{{ test_results.stdout }}"
|
|
role_message: "{{ test_results.stderr|d('test execution error.') }}"
|
|
|
|
- name: display results
|
|
vars:
|
|
msg: |
|
|
role_result: {{ role_result|d('Undefined') }}
|
|
{{ role_message|d('[No error messages found]') }}
|
|
debug:
|
|
msg: "{{ msg.split('\n') }}"
|
|
failed_when: role_message|d("") != ""
|