[openstack-dev] [all] Reviewing code coverage syntax/use across projects
Ronald Bradford
me at ronaldbradford.com
Mon Oct 5 20:56:50 UTC 2015
As part of reviewing the code coverage on various projects I have found
that a number had failing coverage jobs when not configured correctly (many
also work just fine). Starting initially in various Oslo projects my goal
has been to just ensure coverage is defined, runs without errors and is
generally consistent with existing syntax. [1] This investigation has
been part of looking at projects when building a general code coverage
index and historical statistics. [2]
My initial minimum focus is to ensure the following (when either not
defined or partially defined):
- A [tox:cover] section
- The use of python setup.py test --coverage syntax when not defined.
Note this is "test" and not "testr"
- The definition of an applicable .coveragerc to including branches and
omit unit tests from coverage results.
- Applicable .gitignore of various artifacts.
I would also like to start the larger discussion on several points I have
come across (for the wider community of projects) including:
- The removal in .coveragerc omit= option of [project]/openstack/*
when the source tree no longer has this directory. Thanks to an explanation
from dhellmann this seems to be an incubator artifact that is no longer
generally used (but does exist in some projects).
- The use of python setup "test" syntax rather then "testr" for
coverage usage.
- the testr command for setuptools is deprecated (via lifeless)
- There seems a lack of clearly defined Openstack docs around what is
generally found, e.g. [3],[4],[5]. Hopefully the outcome of this discussion
can be some updating of docs.
- Anything else relevant regarding code coverage being more consistent
for OpenStack.
Regards
Ronald
----
[1] https://review.openstack.org/#/q/topic:fix_coverage,n,z
[2] https://review.openstack.org/#/c/221494/
[3] https://wiki.openstack.org/wiki/Testr
[4] https://wiki.openstack.org/wiki/CoverageTesting
[5] http://docs.openstack.org/developer/cinder/devref/unit_tests.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20151005/b97b2fe5/attachment.html>
More information about the OpenStack-dev
mailing list