podman/tests/test_podman.yml
Ed Santiago 5dd1bdae66 Yet more ansible muckery, to get test results
Looks like the code I copied from standard-test-roles
has changed; let's reincorporate it.

In particular, there is now an annoying step that pulls
logs and artifacts from remote-host:/tmp/artifacts .
Well, that doesn't exist in our case because /tmp may
not survive reboots. Workaround: after completion of
each test, push our local (master) artifacts to remote.

And, fix a typo in results.yml

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-05-14 07:14:13 -06:00

36 lines
1.0 KiB
YAML

---
- hosts: localhost
tags:
- classic
- container
vars:
- artifacts: ./artifacts
rootless_user: testuser
roles:
- role: rootless_user_ready
tasks:
# At the start of a run, clean up state. Useful for test reruns.
- name: local artifacts directory exists
local_action: file path="{{ artifacts }}" state=directory
- name: remove stale log files
local_action: shell rm -f {{ artifacts }}/test*.log
- name: clear test results (test.log)
local_action: command truncate --size=0 {{ artifacts }}/test.log
- name: clear test results (results.yml)
local_action: copy content="results:\n" dest={{ artifacts }}/results.yml
# These are the actual tests: set cgroups vN, then run root/rootless tests.
- name: set cgroups and run podman tests
include_tasks: test_podman_cgroups_vn.yml
loop: [ 2, 1 ]
loop_control:
loop_var: want_cgroups
# Postprocessing: check for FAIL or ERROR in any test, exit 1 if so
- name: check results
include_tasks: check_results.yml