
In addition to the main subunit file from zuul_work_dir, collect the subunit files from the elements (directories) of the zuul_additional_subunit_dirs list. The default behavior is unchanged. Change-Id: Ic3bc76aa104951bcc0c186347196067342e28751
24 lines
825 B
YAML
24 lines
825 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: Get the list of directories with subunit files
|
|
set_fact:
|
|
subunit_dirs: "{{ [ zuul_work_dir ] + zuul_additional_subunit_dirs }}"
|
|
|
|
- name: Generate subunit file
|
|
shell:
|
|
cmd: "{{ testr_command.stdout_lines[0] }} last --subunit >>{{ zuul_work_dir }}/testrepository.subunit"
|
|
chdir: "{{ item }}"
|
|
loop: "{{ subunit_dirs }}"
|
|
|
|
- name: Process and fetch subunit results
|
|
include: process.yaml
|