Add Deckhand coverage job

This commits adds a Deckhand coverage job for gauging the test
coverage of Deckhand to tox.ini.

Change-Id: If3cb7b31127dd5cd58c7a3f8dc87f1f7a4f74101
This commit is contained in:
Felipe Monteiro 2017-08-14 19:49:38 +01:00
parent 702c6b783b
commit 6c70cbdbfe
4 changed files with 17 additions and 1 deletions

7
.coveragerc Normal file
View File

@ -0,0 +1,7 @@
[run]
branch = True
source = deckhand
omit = deckhand/tests/*
[report]
ignore_errors = True

2
.gitignore vendored
View File

@ -24,7 +24,6 @@ wheels/
*.egg-info/ *.egg-info/
.installed.cfg .installed.cfg
*.egg *.egg
etc/*.sample
# PyInstaller # PyInstaller
# Usually these files are written by a python script from a template # Usually these files are written by a python script from a template
@ -47,6 +46,7 @@ coverage.xml
*.cover *.cover
.hypothesis/ .hypothesis/
.testrepository/* .testrepository/*
cover/*
# Translations # Translations
*.mo *.mo

View File

@ -7,6 +7,8 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
falcon==1.1.0 falcon==1.1.0
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
mock>=2.0 mock>=2.0
fixtures>=3.0.0 # Apache-2.0/BSD fixtures>=3.0.0 # Apache-2.0/BSD
mox3!=0.19.0,>=0.7.0 # Apache-2.0 mox3!=0.19.0,>=0.7.0 # Apache-2.0

View File

@ -38,6 +38,13 @@ commands =
find . -type f -name "*.pyc" -delete find . -type f -name "*.pyc" -delete
ostestr '{posargs}' ostestr '{posargs}'
[testenv:cover]
commands =
coverage erase
find . -type f -name "*.pyc" -delete
python setup.py testr --coverage --testr-args='{posargs}'
coverage report
[testenv:genconfig] [testenv:genconfig]
commands = oslo-config-generator --config-file=etc/deckhand/config-generator.conf commands = oslo-config-generator --config-file=etc/deckhand/config-generator.conf