Add sonar pom and tox hooks. 70/970/1
authorTommy Carpenter <tc677g@att.com>
Wed, 18 Sep 2019 12:46:55 +0000 (08:46 -0400)
committerTommy Carpenter <tc677g@att.com>
Wed, 18 Sep 2019 12:47:33 +0000 (08:47 -0400)
Rebase sonar (+/951) onto v11.

Change-Id: I21feed13a1007d5e1556afb9eac340f4ea43b0f2
Signed-off-by: Tommy Carpenter <tc677g@att.com>
pom.xml [new file with mode: 0644]
tox.ini

diff --git a/pom.xml b/pom.xml
new file mode 100644 (file)
index 0000000..9d91265
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!--<![CDATA[
+========================LICENSE_START=================================
+O-RAN-SC
+%%
+Copyright (C) 2019 AT&T Intellectual Property and Nokia
+%%
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+========================LICENSE_END===================================
+]]>-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0   http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.o-ran-sc.ric-plt.a1</groupId>
+  <artifactId>a1mediator</artifactId>
+  <version>0</version>
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <sonar.sources>.</sonar.sources>
+    <sonar.junit.reportsPath>xunit-results.xml</sonar.junit.reportsPath>
+    <sonar.python.coverage.reportPath>coverage.xml</sonar.python.coverage.reportPath>
+    <sonar.python.xunit.reportPath>xunit-results.xml</sonar.python.xunit.reportPath>
+    <sonar.language>py</sonar.language>
+    <sonar.pluginname>python</sonar.pluginname>
+    <sonar.inclusions>a1/*.py</sonar.inclusions>
+    <sonar.exclusions>tests/*,setup.py</sonar.exclusions>
+  </properties>
+</project>
diff --git a/tox.ini b/tox.ini
index dc9f690..edf4828 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -28,7 +28,9 @@ setenv =
     RMR_RETRY_TIMES = 2
 
 # Note, before this will work, for the first time on that machine, run ./install_deps.sh
-commands=pytest --verbose --cov {envsitepackagesdir}/a1  --cov-report term-missing --cov-report html
+commands =
+    pytest --junitxml xunit-results.xml --verbose --cov {envsitepackagesdir}/a1 --cov-report term-missing --cov-report html --cov-report xml
+    coverage xml -i
 
 [testenv:flake8]
 basepython = python3.7