From d7d3d03ddf0508df6b33297fc6fc103a84d2f74d Mon Sep 17 00:00:00 2001 From: Jim Rollenhagen Date: Wed, 30 Sep 2015 07:46:20 -0700 Subject: [PATCH] Add a cover target to tox This allows a post job to generate coverage data for ironic-lib. The package name needs to be overridden, as the default is taken to be ironic-lib, not ironic_lib. Omit openstack.common as we aren't responsible for testing that. Change-Id: I30a810effd918b8cb88485a527ecbfbc01dfb2e1 --- tox.ini | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tox.ini b/tox.ini index 63e1fa3d..0326a83b 100644 --- a/tox.ini +++ b/tox.ini @@ -20,5 +20,11 @@ exclude = .venv,.tox,dist,doc,*.egg,.update-venv [testenv:pep8] commands = flake8 {posargs} +[testenv:cover] +setenv = VIRTUALENV={envdir} + LANGUAGE=en_US +commands = + python setup.py testr --coverage --coverage-package-name=ironic_lib --omit=ironic_lib/openstack/common/*.py {posargs} + [testenv:venv] commands = {posargs}