Add test coverage calculation

Adds tox cover job as well.

Change-Id: Ie4f0b5e38545b61da017dbccde1442ec2c6fc382
This commit is contained in:
Martin Kopec 2017-12-07 15:46:14 +00:00
parent ea03aeedf2
commit d59ddbdd27
2 changed files with 19 additions and 1 deletions

View File

@ -1,10 +1,21 @@
---
- project:
name: openstack/python-tempestconf
check:
jobs:
- python-tempestconf-tox-cover
- tripleo-ci-centos-7-containers-multinode
gate:
jobs:
- tripleo-ci-centos-7-containers-multinode
- job:
name: python-tempestconf-tox-cover
parent: openstack-tox
description: Run tox code coverage tests.
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- ^releasenotes/.*$
vars:
tox_envlist: cover

View File

@ -24,10 +24,17 @@ commands = flake8 {posargs}
commands = {posargs}
[testenv:cover]
setenv =
{[testenv]setenv}
PYTHON=coverage run --source config_tempest --parallel-mode
commands =
coverage erase
find . -type f -name "*.pyc" -delete
stestr --test-path ./config_tempest/tests run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[testenv:docs]
commands = python setup.py build_sphinx