Generate junit.xml file for testinfra
And collect it on post, it is helpful to see the results. Change-Id: I0dbecf57bf9182168eb6f99cdf88329fcdeb1bdc Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
9958b253f3
commit
20286235b6
@ -146,6 +146,7 @@
|
||||
ansible_python_interpreter: python2
|
||||
pre-run: playbooks/zuul/run-base-pre.yaml
|
||||
run: playbooks/zuul/run-base.yaml
|
||||
post-run: playbooks/zuul/run-base-post.yaml
|
||||
files:
|
||||
- .zuul.yaml
|
||||
- playbooks/.*
|
||||
|
14
playbooks/zuul/run-base-post.yaml
Normal file
14
playbooks/zuul/run-base-post.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
- hosts: bridge.openstack.org
|
||||
tasks:
|
||||
- name: Register junit.xml file
|
||||
stat:
|
||||
path: "{{ zuul.project.src_dir }}/junit.xml"
|
||||
register: _junit
|
||||
|
||||
- name: Collect testinfra logs
|
||||
synchronize:
|
||||
dest: "{{ zuul.executor.log_root }}"
|
||||
mode: pull
|
||||
src: "{{ zuul.project.src_dir }}/junit.xml"
|
||||
verify_host: true
|
||||
when: _junit.stat.exists|bool
|
2
tox.ini
2
tox.ini
@ -32,7 +32,7 @@ deps = -r{toxinidir}/doc/requirements.txt
|
||||
commands = sphinx-build -W -E -b html doc/source doc/build/html
|
||||
|
||||
[testenv:testinfra]
|
||||
commands = py.test -n 5 --connection=ansible --ansible-inventory=/etc/ansible/hosts/inventory.yaml --hosts=all -v {posargs}
|
||||
commands = py.test -n 5 --junit-xml junit.xml --connection=ansible --ansible-inventory=/etc/ansible/hosts/inventory.yaml --hosts=all -v {posargs}
|
||||
|
||||
[flake8]
|
||||
show-source = True
|
||||
|
Loading…
Reference in New Issue
Block a user