From 6e6babd96b389602e6ab4b3550a0c3db4f9ae7c6 Mon Sep 17 00:00:00 2001 From: Andrew Gauld Date: Thu, 22 Feb 2018 14:55:37 -0500 Subject: Make SONAR code coverage work Change-Id: Id54f9199d4ac7a1a501a875743fa35aecbe60ac4 Issue-ID: DCAEGEN2-355 Signed-off-by: Andrew Gauld --- dmaap/tox.ini | 12 +++++++++--- dnsdesig/pom.xml | 13 +++---------- dnsdesig/tox.ini | 12 +++++++++--- pgaas/pom.xml | 17 +++-------------- pgaas/tox.ini | 10 +++++++--- pom.xml | 5 +++++ sshkeyshare/pom.xml | 13 +++---------- sshkeyshare/tox.ini | 10 ++++++++-- 8 files changed, 47 insertions(+), 45 deletions(-) diff --git a/dmaap/tox.ini b/dmaap/tox.ini index 9498c82..9a23f83 100644 --- a/dmaap/tox.ini +++ b/dmaap/tox.ini @@ -20,7 +20,13 @@ envlist = py27 [testenv] deps= - pytest - cloudify==3.4 requests -commands=pytest + cloudify==3.4 + pytest + coverage + pytest-cov +setenv = + PYTHONPATH={toxinidir} +commands= + pytest --junitxml xunit-results.xml --cov dmaapcontrollerif --cov consulif --cov dmaapplugin --cov-report xml + coverage xml diff --git a/dnsdesig/pom.xml b/dnsdesig/pom.xml index 9306540..2d96e81 100644 --- a/dnsdesig/pom.xml +++ b/dnsdesig/pom.xml @@ -44,19 +44,12 @@ limitations under the License. type_files/dnsdesig/dns_types.yaml UTF-8 . - - http://localhost:9000 - - + xunit-results.xml + coverage.xml py Python **/*.py - - + tests/*,setup.py diff --git a/dnsdesig/tox.ini b/dnsdesig/tox.ini index 9498c82..0b0f114 100644 --- a/dnsdesig/tox.ini +++ b/dnsdesig/tox.ini @@ -20,7 +20,13 @@ envlist = py27 [testenv] deps= - pytest - cloudify==3.4 requests -commands=pytest + cloudify==3.4 + pytest + coverage + pytest-cov +setenv= + PYTHONPATH={toxinidir} +commands= + pytest --junitxml xunit-results.xml --cov dnsdesig --cov-report xml + coverage xml 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. type_files/pgaas/pgaas_types.yaml UTF-8 - true . - - http://localhost:9000 - **/xunit-results.xml - **/coverage.xml - tests/* - - + xunit-results.xml + coverage.xml py Python **/*.py - - + tests/*,setup.py 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 diff --git a/pom.xml b/pom.xml index 5551520..acebb69 100644 --- a/pom.xml +++ b/pom.xml @@ -36,5 +36,10 @@ limitations under the License. pgaas dnsdesig + + UTF-8 + http://localhost:9000 + **/*.py + diff --git a/sshkeyshare/pom.xml b/sshkeyshare/pom.xml index 06fc8df..c3e6b6b 100644 --- a/sshkeyshare/pom.xml +++ b/sshkeyshare/pom.xml @@ -44,19 +44,12 @@ limitations under the License. type_files/sshkeyshare/sshkey_types.yaml UTF-8 . - - http://localhost:9000 - - + xunit-results.xml + coverage.xml py Python **/*.py - - + tests/*,setup.py diff --git a/sshkeyshare/tox.ini b/sshkeyshare/tox.ini index 3a6c714..29b7a45 100644 --- a/sshkeyshare/tox.ini +++ b/sshkeyshare/tox.ini @@ -2,6 +2,12 @@ envlist = py27 [testenv] deps= - pytest cloudify==3.4 -commands=pytest + pytest + coverage + pytest-cov +setenv= + PYTHONPATH={toxinidir} +commands= + pytest --junitxml xunit-results.xml --cov sshkeyshare --cov-report xml + coverage xml -- cgit 1.2.3-korg