Collect output from coverage job

Add a post-run playbook to tox-cover job to collect the coverage
report detail and copy it to the log root of the executor.

Change-Id: Ibad091f7630832eb993133b0f43a60931b3dfd75
This commit is contained in:
Tom Barron 2017-10-17 21:51:47 -04:00
parent ecd0d55ce1
commit 74a40ec89e
5 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,3 @@
- hosts: all
roles:
- role: fetch-coverage-output

View File

@ -0,0 +1,20 @@
Collect output from a coverage run
By default, this copies the output from a coverage run
on the worker to the log root of the executor.
**Role Variables**
.. zuul:rolevar:: zuul_executor_dest
:default: {{ zuul.executor.log_root }}
The destination directory on the executor. By default, the log
root.
.. zuul:rolevar:: coverage_output_src
:default: {{ zuul.project.canonical_name }}/cover/
The location on the worker from which to fetch the coverage
output detail. By default, the ``cover`` dir of the current
project.

View File

@ -0,0 +1,2 @@
zuul_executor_dest: "{{ zuul.executor.log_root }}"
coverage_output_src: "src/{{ zuul.project.canonical_name }}/cover/"

View File

@ -0,0 +1,6 @@
- name: Collect coverage details output
synchronize:
dest: "{{ zuul_executor_dest }}"
mode: pull
src: "{{ coverage_output_src }}"
verify_host: true

View File

@ -123,6 +123,7 @@
Run code coverage tests.
Uses tox with the ``cover`` environment.
post-run: playbooks/cover/tox/cover-post
vars:
tox_envlist: cover