Restore coverage job
Change-Id: I22d8585dafeeca50d625cafe05a7c0833e1b3c1e
This commit is contained in:
parent
67882d55ca
commit
96062c99da
@ -28,12 +28,24 @@
|
|||||||
vars:
|
vars:
|
||||||
tox_envlist: py35
|
tox_envlist: py35
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: rally-tox-cover
|
||||||
|
parent: tox
|
||||||
|
description: |
|
||||||
|
Run test for rally project.
|
||||||
|
|
||||||
|
Uses tox with the ``cover`` environment.
|
||||||
|
vars:
|
||||||
|
tox_envlist: cover
|
||||||
|
post-run: tests/ci/playbooks/post-rally-coverage.yaml
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- rally-tox-pep8
|
- rally-tox-pep8
|
||||||
- rally-tox-py27
|
- rally-tox-py27
|
||||||
- rally-tox-py35
|
- rally-tox-py35
|
||||||
|
- rally-tox-cover
|
||||||
- rally-docker-check
|
- rally-docker-check
|
||||||
- rally-task-simple-job
|
- rally-task-simple-job
|
||||||
- rally-task-basic-with-existing-users:
|
- rally-task-basic-with-existing-users:
|
||||||
@ -82,6 +94,7 @@
|
|||||||
- rally-tox-pep8
|
- rally-tox-pep8
|
||||||
- rally-tox-py27
|
- rally-tox-py27
|
||||||
- rally-tox-py35
|
- rally-tox-py35
|
||||||
|
- rally-tox-cover
|
||||||
- rally-docker-check
|
- rally-docker-check
|
||||||
- rally-task-simple-job
|
- rally-task-simple-job
|
||||||
#- rally-task-heat
|
#- rally-task-heat
|
||||||
|
@ -32,8 +32,8 @@ fi
|
|||||||
# Checkout master and save coverage report
|
# Checkout master and save coverage report
|
||||||
git checkout HEAD^
|
git checkout HEAD^
|
||||||
|
|
||||||
baseline_report=$(mktemp -t rally_coverageXXXXXXX)
|
baseline_report=$(mktemp -t rally_openstack_coverageXXXXXXX)
|
||||||
py.test --cov=rally tests/unit/ --cov-report=html -n auto
|
py.test --cov=rally_openstack tests/unit/ --cov-report=html -n auto
|
||||||
coverage report > $baseline_report
|
coverage report > $baseline_report
|
||||||
mv cover cover-master
|
mv cover cover-master
|
||||||
cat $baseline_report
|
cat $baseline_report
|
||||||
@ -42,8 +42,8 @@ baseline_missing=$(awk 'END { print $3 }' $baseline_report)
|
|||||||
# Checkout back and save coverage report
|
# Checkout back and save coverage report
|
||||||
git checkout -
|
git checkout -
|
||||||
|
|
||||||
current_report=$(mktemp -t rally_coverageXXXXXXX)
|
current_report=$(mktemp -t rally_openstack_coverageXXXXXXX)
|
||||||
py.test --cov=rally tests/unit/ --cov-report=html -n auto
|
py.test --cov=rally_openstack tests/unit/ --cov-report=html -n auto
|
||||||
coverage report > $current_report
|
coverage report > $current_report
|
||||||
current_missing=$(awk 'END { print $3 }' $current_report)
|
current_missing=$(awk 'END { print $3 }' $current_report)
|
||||||
|
|
||||||
|
15
tests/ci/playbooks/post-rally-coverage.yaml
Normal file
15
tests/ci/playbooks/post-rally-coverage.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
- hosts: all
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
- name: Put coverage report in the right place
|
||||||
|
synchronize:
|
||||||
|
src: "{{ zuul.projects['git.openstack.org/openstack/rally-openstack'].src_dir }}/cover-master/"
|
||||||
|
dest: '{{ zuul.executor.log_root }}/coverage/'
|
||||||
|
mode: pull
|
||||||
|
copy_links: true
|
||||||
|
verify_host: true
|
||||||
|
rsync_opts:
|
||||||
|
- --include=/**
|
||||||
|
- --include=*/
|
||||||
|
- --exclude=*
|
||||||
|
- --prune-empty-dirs
|
Loading…
Reference in New Issue
Block a user