From 2394a98f909c260f15dc15bd8d0205afa28dacf3 Mon Sep 17 00:00:00 2001 From: Lianhao Lu Date: Tue, 20 Mar 2018 09:26:54 +0800 Subject: Added sonar coverage report Adjusted the tox settings to generate the unit test coverage report to be used by sonar. Change-Id: I825b1770f1a27ceaafde181ce9d7cd44882e70c6 Issue-ID: VNFSDK-210 Signed-off-by: Lianhao Lu --- pom.xml | 4 +++- tox.ini | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index d6cfc3d..7e7fa24 100644 --- a/pom.xml +++ b/pom.xml @@ -27,11 +27,13 @@ under the License. org.onap.vnfsdk.pkgtools - vnf-sdk-pkgtools + vnfsdk-pkgtools vnfsdk-pkgtools CSAR manipulation shared library with CLI + xunit-results.xml + coverage.xml py Python **/*.py diff --git a/tox.ini b/tox.ini index 6e0b55c..393ea42 100644 --- a/tox.ini +++ b/tox.ini @@ -32,6 +32,9 @@ basepython = py27: python2.7 [testenv:py27] -commands = - pytest tests --cov-report term-missing --cov packager --cov cli +commands = + coverage run --module pytest --junitxml xunit-results.xml + coverage xml --omit=".tox/py27/*","tests/*" + coverage report --omit=".tox/py27/*","tests/*" + #pytest tests --cov-report term-missing --cov packager --cov cli -- cgit 1.2.3-korg