zuul-jobs/roles/fetch-subunit-output/tasks/main.yaml
2019-08-01 17:55:58 +00:00

20 lines
629 B
YAML

# We're not using with_first_found because the files are remote, not local.
# We want to use stestr if it exists or fallback to testr - and we want to
# prefer files found in tox envs.
- name: Find stestr or testr executable
script: "find-testr.sh {{ zuul_work_dir }}"
register: testr_command
- when:
- testr_command.rc == 0
- testr_command.stdout_lines
block:
- name: Generate subunit file
shell:
cmd: "{{ testr_command.stdout_lines[0] }} last --subunit > ./testrepository.subunit"
chdir: "{{ zuul_work_dir }}"
- name: Process and fetch subunit results
include: process.yaml