[openstack-dev] [all] Reviewing code coverage syntax/use across projects
Doug Hellmann
doug at doughellmann.com
Mon Oct 5 21:02:52 UTC 2015
Excerpts from Ronald Bradford's message of 2015-10-05 16:56:50 -0400:
> 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).
To clarify, that's where files from the incubator end up when a
project copies incubated code into its source tree. Not all projects
do this, and the ones that do copy different bits of the code. That
code is all tested in the openstack/oslo-incubator repository where
it is being developed, but we don't copy the tests with the main
part of the source so we don't want to hurt the coverage metrics
for a project while it is using incubated code.
Doug
>
>
> - 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
More information about the OpenStack-dev
mailing list