diff options
author | Lianhao Lu <lianhao.lu@intel.com> | 2018-03-20 09:26:54 +0800 |
---|---|---|
committer | Lianhao Lu <lianhao.lu@intel.com> | 2018-03-20 09:26:54 +0800 |
commit | 2394a98f909c260f15dc15bd8d0205afa28dacf3 (patch) | |
tree | 78d25047e88c7d6402b56b7f5510c6c40137c319 | |
parent | 2db182a78a28d320bddc1a08f0035cf5c196aab8 (diff) |
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 <lianhao.lu@intel.com>
-rw-r--r-- | pom.xml | 4 | ||||
-rw-r--r-- | tox.ini | 7 |
2 files changed, 8 insertions, 3 deletions
@@ -27,11 +27,13 @@ under the License. </parent> <groupId>org.onap.vnfsdk.pkgtools</groupId> - <artifactId>vnf-sdk-pkgtools</artifactId> + <artifactId>vnfsdk-pkgtools</artifactId> <name>vnfsdk-pkgtools</name> <description>CSAR manipulation shared library with CLI</description> <properties> + <sonar.junit.reportsPath>xunit-results.xml</sonar.junit.reportsPath> + <sonar.python.coverage.reportPath>coverage.xml</sonar.python.coverage.reportPath> <sonar.language>py</sonar.language> <sonar.pluginName>Python</sonar.pluginName> <sonar.inclusions>**/*.py</sonar.inclusions> @@ -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 |