Use .coveragerc to omit directories
We can use the omit option instead of adding --omit argument, so that we can run coverage commands outside of tox easily. Also this fixes the inconsistent omit used in some coverage commands in tox. Change-Id: I1efa406401c2e8a6b705daef4921b2dec7d55f2e
This commit is contained in:
parent
841d419ed1
commit
54bddd5b9f
@ -1,6 +1,9 @@
|
||||
[run]
|
||||
branch = True
|
||||
source = ovn_bgp_agent
|
||||
omit = ovn_bgp_agent/tests/*,
|
||||
ovn_bgp_agent/privileged/linux_net.py,
|
||||
ovn_bgp_agent/utils/linux_net.py
|
||||
|
||||
[report]
|
||||
ignore_errors = True
|
||||
|
6
tox.ini
6
tox.ini
@ -38,9 +38,9 @@ setenv =
|
||||
commands =
|
||||
stestr run --exclude-regex ".tests.functional" {posargs}
|
||||
coverage combine
|
||||
coverage html -d cover --omit='ovn_bgp_agent/tests/*'
|
||||
coverage xml -o cover/coverage.xml --omit='ovn_bgp_agent/tests/*'
|
||||
coverage report --fail-under=82 --skip-covered --omit='ovn_bgp_agent/tests/*,ovn_bgp_agent/privileged/linux_net.py,ovn_bgp_agent/utils/linux_net.py'
|
||||
coverage html -d cover
|
||||
coverage xml -o cover/coverage.xml
|
||||
coverage report --fail-under=82 --skip-covered
|
||||
|
||||
[testenv:docs]
|
||||
deps = -r{toxinidir}/doc/requirements.txt
|
||||
|
Loading…
Reference in New Issue
Block a user