]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard_v2: Combine coverage and tests results from py27 and py3
authorRicardo Dias <rdias@suse.com>
Fri, 26 Jan 2018 08:50:50 +0000 (08:50 +0000)
committerRicardo Dias <rdias@suse.com>
Mon, 5 Mar 2018 13:07:00 +0000 (13:07 +0000)
Signed-off-by: Ricardo Dias <rdias@suse.com>
src/pybind/mgr/dashboard_v2/.gitignore
src/pybind/mgr/dashboard_v2/tox.ini

index d9d70e78a0e0347e0fcea96379fb4f701b5452c7..e1201584473d008c499e3f67dc36345c09a4c460 100644 (file)
@@ -1,8 +1,8 @@
-.coverage
+.coverage*
 htmlcov
 .tox
 coverage.xml
-junit.xml
+junit*xml
 __pycache__
 
 # IDE
index 56c3074edbf6179454ec1b5f214de2d5f735efd6..c570313e16d0e517f221ecaf31e82b6a85c75f77 100644 (file)
@@ -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