Restore coverage job
Change-Id: I22d8585dafeeca50d625cafe05a7c0833e1b3c1e
This commit is contained in:
parent
67882d55ca
commit
96062c99da
@ -28,12 +28,24 @@
|
||||
vars:
|
||||
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:
|
||||
check:
|
||||
jobs:
|
||||
- rally-tox-pep8
|
||||
- rally-tox-py27
|
||||
- rally-tox-py35
|
||||
- rally-tox-cover
|
||||
- rally-docker-check
|
||||
- rally-task-simple-job
|
||||
- rally-task-basic-with-existing-users:
|
||||
@ -82,6 +94,7 @@
|
||||
- rally-tox-pep8
|
||||
- rally-tox-py27
|
||||
- rally-tox-py35
|
||||
- rally-tox-cover
|
||||
- rally-docker-check
|
||||
- rally-task-simple-job
|
||||
#- rally-task-heat
|
||||
|
@ -32,8 +32,8 @@ fi
|
||||
# Checkout master and save coverage report
|
||||
git checkout HEAD^
|
||||
|
||||
baseline_report=$(mktemp -t rally_coverageXXXXXXX)
|
||||
py.test --cov=rally tests/unit/ --cov-report=html -n auto
|
||||
baseline_report=$(mktemp -t rally_openstack_coverageXXXXXXX)
|
||||
py.test --cov=rally_openstack tests/unit/ --cov-report=html -n auto
|
||||
coverage report > $baseline_report
|
||||
mv cover cover-master
|
||||
cat $baseline_report
|
||||
@ -42,8 +42,8 @@ baseline_missing=$(awk 'END { print $3 }' $baseline_report)
|
||||
# Checkout back and save coverage report
|
||||
git checkout -
|
||||
|
||||
current_report=$(mktemp -t rally_coverageXXXXXXX)
|
||||
py.test --cov=rally tests/unit/ --cov-report=html -n auto
|
||||
current_report=$(mktemp -t rally_openstack_coverageXXXXXXX)
|
||||
py.test --cov=rally_openstack tests/unit/ --cov-report=html -n auto
|
||||
coverage report > $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