0206d6671a
When processing subunit streams we attempt to discover where the (s)testr commands are located. For some reason the output of our scripts that do this very occasionally emit a newline before the command path. When this happens we were using the blank line as the command path which fails as that empty command results in our command arguments being interpreted as the command path. Attempt to address this by trimming the stdout instead of taking the first line. This should remove the leading and trailing newlines and give us only the command itself. Change-Id: Id651e019cf3d0b7ab37fdf9df04be249ea7f7af6
20 lines
718 B
YAML
20 lines
718 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
|
|
set_fact:
|
|
# We use the trim filter here on all stdout because for some reason
|
|
# we occasionally get the command listed with a blank line prefix.
|
|
# This should clean that up.
|
|
subunit_html_command: "{{ find_subunit2html_output.stdout | trim }}"
|
|
|
|
- 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
|