zuul-jobs/roles/fetch-testr-output/tasks/process.yaml
Paul Belanger d2d4abedc5
Move subunit processing into fetch-testr-output
This logic makes more sense in the fetch-testr-output role. I've also
left a few TODO action for a followup patch.  Specifically, this
still depends some openstack-infra configuration.

Change-Id: Iea8968708e3e80f0d21434ec08fff5e4ee7bdf4d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-07-26 14:29:26 -04:00

34 lines
950 B
YAML

- name: Generate testrepository.subunit file
# TODO(pabelanger): We cannot depend on tox_envlist here!!!
shell: ".tox/{{ tox_envlist }}/bin/testr last --subunit > ./testrepository.subunit"
args:
chdir: "{{ zuul_work_dir }}"
- name: Generate testr_results.html file
# TODO(pabelanger): We cannot depend on /usr/os-testr-env here!!!
command: "/usr/os-testr-env/bin/subunit2html ./testrepository.subunit testr_results.html"
args:
chdir: "{{ zuul_work_dir }}"
- name: Register testrepository.subunit file
stat:
path: "{{ zuul_work_dir }}/testrepository.subunit"
register: p
- name: Compress testrepository.subunit file
archive:
path: "{{ p.stat.path }}"
when:
- p.stat.exists
- name: Register testr_results.html file
stat:
path: "{{ zuul_work_dir }}/testr_results.html"
register: html
- name: Compress testr_results.html file
archive:
path: "{{ html.stat.path }}"
when:
- html.stat.exists