From cddc6d5745ab589531bfa9cd3a52d7a92a66bd01 Mon Sep 17 00:00:00 2001 From: Larry Rensing Date: Wed, 20 Apr 2016 17:36:35 +0000 Subject: [PATCH] Cleanup and fix Tacker coverage Test classes were being accounted for during coverage, they are now ignored for more accurate coverage metrics. Remove references to neutron in .coveragerc. Fix tox.ini coverage entry. Co-Authored-By: Larry Rensing Co-Authored-By: Sridhar Ramaswamy Change-Id: I92d50592a5ba43f68554aa933ab8582897b58b43 --- .coveragerc | 4 ++-- tox.ini | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.coveragerc b/.coveragerc index 3aa5675f8..1ba1c5cc3 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,7 +1,7 @@ [run] branch = True -source = neutron -omit = neutron/tests/*,neutron/plugins/cisco/test/*,neutron/openstack/* +source = tacker +omit = tacker/tests/* [report] ignore_errors = True diff --git a/tox.ini b/tox.ini index 404794c07..417d1c088 100644 --- a/tox.ini +++ b/tox.ini @@ -54,8 +54,17 @@ commands = python setup.py build_sphinx [testenv:cover] +# Also do not run test_coverage_ext tests while gathering coverage as those +# tests conflict with coverage. +# NOTE(sdague): this target does not use constraints because +# upstream infra does not yet support it. Once that's fixed, we can +# drop the install_command. +install_command = pip install -U --force-reinstall {opts} {packages} commands = - python -m tacker.openstack.common.lockutils python setup.py testr --coverage --testr-args='{posargs}' + coverage erase + python setup.py testr --coverage --testr-args='{posargs}' + coverage combine + coverage html --include='tacker/*' -d covhtml -i [testenv:venv] commands = {posargs}