From: Ricardo Dias Date: Fri, 26 Jan 2018 08:50:50 +0000 (+0000) Subject: mgr/dashboard_v2: Combine coverage and tests results from py27 and py3 X-Git-Tag: v13.0.2~84^2~135 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4fd405e8d789897ce75fd596ce0c0c8010298425;p=ceph.git mgr/dashboard_v2: Combine coverage and tests results from py27 and py3 Signed-off-by: Ricardo Dias --- diff --git a/src/pybind/mgr/dashboard_v2/.gitignore b/src/pybind/mgr/dashboard_v2/.gitignore index d9d70e78a0e0..e1201584473d 100644 --- a/src/pybind/mgr/dashboard_v2/.gitignore +++ b/src/pybind/mgr/dashboard_v2/.gitignore @@ -1,8 +1,8 @@ -.coverage +.coverage* htmlcov .tox coverage.xml -junit.xml +junit*xml __pycache__ # IDE diff --git a/src/pybind/mgr/dashboard_v2/tox.ini b/src/pybind/mgr/dashboard_v2/tox.ini index 56c3074edbf6..c570313e16d0 100644 --- a/src/pybind/mgr/dashboard_v2/tox.ini +++ b/src/pybind/mgr/dashboard_v2/tox.ini @@ -1,22 +1,31 @@ [tox] -envlist = py27,py3,lint +envlist = cov-init,py27,py3,cov-report,lint skipsdist = true -[testenv:py27] +[testenv] deps=-r{toxinidir}/requirements.txt setenv= UNITTEST=true WEBTEST_INTERACTIVE=false + COVERAGE_FILE= .coverage.{envname} commands= - {envbindir}/py.test --cov=. --cov-report=term tests/ + {envbindir}/py.test --cov=. --cov-report= --junitxml=junit.{envname}.xml tests/ -[testenv:py3] -deps=-r{toxinidir}/requirements.txt -setenv= - UNITTEST=true - WEBTEST_INTERACTIVE=false -commands= - {envbindir}/py.test --cov=. --cov-report=term --cov-report=xml --junitxml=junit.xml tests/ +[testenv:cov-init] +setenv = + COVERAGE_FILE = .coverage +deps = coverage +commands = + coverage erase + +[testenv:cov-report] +setenv = + COVERAGE_FILE = .coverage +deps = coverage +commands = + coverage combine + coverage report + coverage xml [testenv:lint] deps=-r{toxinidir}/requirements.txt