Browse Source

tox.ini: Updated [testenv:cover] so that coverage generates a report

Also added omissions in .coveragerc to ensure that the report doesn't
test tests, nor __init__.pys.

Change-Id: I5f816b9a030e3941c6e38ea5610047aa6f93b6f8
changes/16/429116/2
Shriram Chander 5 years ago
parent
commit
a22d1eafe4
  1. 4
      .coveragerc
  2. 7
      tox.ini

4
.coveragerc

@ -0,0 +1,4 @@
[run]
omit =
networking_vpp/tests/*
*/__init__.py

7
tox.ini

@ -1,6 +1,6 @@
[tox]
minversion = 2.0
envlist = py35,py34,py27,pep8
envlist = py35,py34,py27,pep8,cover
skipsdist = True
[testenv]
@ -13,6 +13,7 @@ passenv = TRACE_FAILONLY
install_command = {toxinidir}/tools/tox_install.sh {opts} {packages}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
coverage
commands = ostestr --regex '{posargs}'
[testenv:pep8]
@ -22,7 +23,9 @@ commands = flake8
commands = {posargs}
[testenv:cover]
commands = python setup.py test --coverage --testr-args='{posargs}'
commands =
python setup.py test --coverage --coverage-package-name='networking_vpp' --testr-args='{posargs}'
coverage report
[testenv:docs]
commands = python setup.py build_sphinx

Loading…
Cancel
Save