Merge "Generate junit.xml file for testinfra"
This commit is contained in:
commit
768df606b0
@ -146,6 +146,7 @@
|
|||||||
ansible_python_interpreter: python2
|
ansible_python_interpreter: python2
|
||||||
pre-run: playbooks/zuul/run-base-pre.yaml
|
pre-run: playbooks/zuul/run-base-pre.yaml
|
||||||
run: playbooks/zuul/run-base.yaml
|
run: playbooks/zuul/run-base.yaml
|
||||||
|
post-run: playbooks/zuul/run-base-post.yaml
|
||||||
files:
|
files:
|
||||||
- .zuul.yaml
|
- .zuul.yaml
|
||||||
- playbooks/.*
|
- 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
|
commands = sphinx-build -W -E -b html doc/source doc/build/html
|
||||||
|
|
||||||
[testenv:testinfra]
|
[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]
|
[flake8]
|
||||||
show-source = True
|
show-source = True
|
||||||
|
Loading…
Reference in New Issue
Block a user