diff options
author | 2018-02-22 14:55:37 -0500 | |
---|---|---|
committer | 2018-02-22 14:56:35 -0500 | |
commit | 6e6babd96b389602e6ab4b3550a0c3db4f9ae7c6 (patch) | |
tree | eaadd3605e818063bf492b71a079b0c0aa4ecc87 /pgaas | |
parent | d154b4c606f4af5873676fed4bea39f8b91adee6 (diff) |
Make SONAR code coverage work
Change-Id: Id54f9199d4ac7a1a501a875743fa35aecbe60ac4
Issue-ID: DCAEGEN2-355
Signed-off-by: Andrew Gauld <ag1282@att.com>
Diffstat (limited to 'pgaas')
-rw-r--r-- | pgaas/pom.xml | 17 | ||||
-rw-r--r-- | pgaas/tox.ini | 10 |
2 files changed, 10 insertions, 17 deletions
diff --git a/pgaas/pom.xml b/pgaas/pom.xml index 6fcebdd..d9504e7 100644 --- a/pgaas/pom.xml +++ b/pgaas/pom.xml @@ -43,24 +43,13 @@ limitations under the License. <!-- path, in repo, to store type file --> <typefile.dest>type_files/pgaas/pgaas_types.yaml</typefile.dest> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <sonar.skip>true</sonar.skip> <sonar.sources>.</sonar.sources> - <!-- customize the SONARQUBE URL --> - <sonar.host.url>http://localhost:9000</sonar.host.url> - <sonar.junit.reportsPath>**/xunit-results.xml</sonar.junit.reportsPath> - <sonar.python.coverage.reportPath>**/coverage.xml</sonar.python.coverage.reportPath> - <sonar.exclusions>tests/*</sonar.exclusions> - <!-- below are language dependent --> - <!-- for Python --> + <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> - <!-- for JavaScaript --> - <!-- - <sonar.language>js</sonar.language> - <sonar.pluginName>JS</sonar.pluginName> - <sonar.inclusions>**/*.js</sonar.inclusions> - --> + <sonar.exclusions>tests/*,setup.py</sonar.exclusions> </properties> <build> diff --git a/pgaas/tox.ini b/pgaas/tox.ini index 28f1f3f..76daae0 100644 --- a/pgaas/tox.ini +++ b/pgaas/tox.ini @@ -20,9 +20,13 @@ envlist = py27 [testenv] deps= - pytest - cloudify==3.4 requests + cloudify==3.4 + pytest coverage pytest-cov -commands=pytest --junitxml xunit-results.xml --cov {envsitepackagesdir}/pgaas --cov-report xml --cov-report html +setenv= + PYTHONPATH={toxinidir} +commands= + pytest --junitxml xunit-results.xml --cov pgaas --cov-report xml + coverage xml |