Merge "Don't fetch coverage report from failing tests"
This commit is contained in:
commit
48409d9c13
@ -12,7 +12,7 @@ on the worker to the log root of the executor.
|
||||
root.
|
||||
|
||||
.. zuul:rolevar:: coverage_output_src
|
||||
:default: {{ zuul.project.canonical_name }}/cover/
|
||||
:default: {{ zuul.project.src_dir }}/cover/
|
||||
|
||||
The location on the worker from which to fetch the coverage
|
||||
output detail. By default, the ``cover`` dir of the current
|
||||
|
@ -1,2 +1,2 @@
|
||||
zuul_executor_dest: "{{ zuul.executor.log_root }}"
|
||||
coverage_output_src: "src/{{ zuul.project.canonical_name }}/cover"
|
||||
coverage_output_src: "{{ zuul.project.src_dir }}/cover"
|
||||
|
@ -1,6 +1,20 @@
|
||||
- name: Collect coverage details output
|
||||
synchronize:
|
||||
dest: "{{ zuul_executor_dest }}"
|
||||
mode: pull
|
||||
src: "{{ coverage_output_src }}"
|
||||
verify_host: true
|
||||
- when: zuul_success | default(true) | bool
|
||||
block:
|
||||
|
||||
- name: Check to see if coverage report exists
|
||||
stat:
|
||||
path: "{{ coverage_output_src }}"
|
||||
register: coverage_report_stat
|
||||
|
||||
- name: Collect coverage details output
|
||||
synchronize:
|
||||
dest: "{{ zuul_executor_dest }}"
|
||||
mode: pull
|
||||
src: "{{ coverage_output_src }}"
|
||||
verify_host: true
|
||||
when: coverage_report_stat.stat.exists
|
||||
|
||||
- name: Fail if coverage report not found
|
||||
fail:
|
||||
msg: "Coverage report was not found even though tests succeeded"
|
||||
when: not coverage_report_stat.stat.exists
|
||||
|
Loading…
Reference in New Issue
Block a user