From: John Mulligan Date: Mon, 19 Sep 2022 19:11:27 +0000 (-0400) Subject: cephadm: add a tox env for generating a coverage report X-Git-Tag: v18.1.0~1142^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F48191%2Fhead;p=ceph.git cephadm: add a tox env for generating a coverage report This "dormant" target is here for developers to run locally and generate a HTML coverage report to review. Signed-off-by: John Mulligan --- diff --git a/src/cephadm/tox.ini b/src/cephadm/tox.ini index 56fe33303627..9f280bc19539 100644 --- a/src/cephadm/tox.ini +++ b/src/cephadm/tox.ini @@ -65,3 +65,13 @@ commands = bash -c "test $(grep -c 'docker.io' cephadm.py) == 11" # Downstream distributions may choose to alter this "docker.io" number, # to make sure no new references to docker.io are creeping in unnoticed. + +# coverage env is intentionally left out of the envlist. It is here for developers +# to run locally to generate and review test coverage of cephadm. +[testenv:coverage] +skip_install=true +deps = + {[testenv]deps} + pytest-cov +commands = + pytest -v --cov=cephadm --cov-report=term-missing --cov-report=html {posargs}