Add test coverage calculation
Adds tox cover job as well. Change-Id: Ie4f0b5e38545b61da017dbccde1442ec2c6fc382
This commit is contained in:
parent
ea03aeedf2
commit
d59ddbdd27
13
.zuul.yaml
13
.zuul.yaml
@ -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
|
||||
|
7
tox.ini
7
tox.ini
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user