f6a92ecb6c
Use subunit2html from tox envs instead of os-testr-env We have an openstack-infra hard-coded location in this role. Rework it to try looking in the tox env if one exists or to look on the system. Leave /usr/os-testr-env in as a fallback but with a debug statement so that we can track instances of the fallback being used. tox_envlist can be a comma separated list. If it is, the "find subunit2html in a tox env" logic isn't going to work. Use a shell script so that we can do a first-found logic similar to what we use in ensure-sphinx for finding requirements files. It's a big bash blob. Put it in a file so it syntax highlights correctly and execute it with the script module. Change-Id: I0b468840fd04a379007fe5aca07feb2eaf7081ac
17 lines
549 B
YAML
17 lines
549 B
YAML
- name: Look for subunit2html command
|
|
script: "find-subunit2html.sh {{ zuul_work_dir }}"
|
|
failed_when: false
|
|
register: find_subunit2html_output
|
|
|
|
- name: Define subunit_html_command fact
|
|
when:
|
|
- find_subunit2html_output.rc == 0
|
|
- find_subunit2html_output.stdout_lines
|
|
set_fact:
|
|
subunit_html_command: "{{ find_subunit2html_output.stdout_lines[0] }}"
|
|
|
|
- name: Emit a debug line so we can search logstash for fallback hits
|
|
debug:
|
|
msg: "subunit2html found in: {{ subunit_html_command }}"
|
|
when: subunit_html_command is defined
|