Add per test information 13/21713/1
authorSam Hague <shague@redhat.com>
Wed, 3 Jun 2015 02:12:12 +0000 (22:12 -0400)
committerSam Hague <shague@redhat.com>
Wed, 3 Jun 2015 04:19:29 +0000 (00:19 -0400)
Change-Id: I4859e9977db5099485fe53c4bc663bd484a61ed5
Signed-off-by: Sam Hague <shague@redhat.com>
openstack/net-virt-it/pom.xml
openstack/net-virt-providers/pom.xml
openstack/net-virt/pom.xml
southbound/southbound-impl/pom.xml
southbound/southbound-it/pom.xml

index a871fe8c21ea44bc294208c39f5c45b21a337a06..29cd6266dd187f279826cbc9f6e2b43d68cfa981 100644 (file)
@@ -42,6 +42,9 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   </scm>
   <properties>
     <skip.integrationtest>true</skip.integrationtest>
+    <sonar-jacoco-listeners.version>2.4</sonar-jacoco-listeners.version>
+    <root.directory>${env.PWD}</root.directory>
+    <sonar.jacoco.itReportPath>${root.directory}/target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
   </properties>
   <dependencyManagement>
     <dependencies>
@@ -131,12 +134,30 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <artifactId>junit</artifactId>
       <scope>compile</scope>
     </dependency>
+    <dependency>
+      <groupId>org.codehaus.sonar-plugins.java</groupId>
+      <artifactId>sonar-jacoco-listeners</artifactId>
+      <version>${sonar-jacoco-listeners.version}</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
   <build>
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>
+        <configuration>
+          <!-- Specific to generate mapping between tests and covered code -->
+          <!--<argLine>${jacoco.agent.it.arg}</argLine>-->
+          <properties>
+            <property>
+              <name>listener</name>
+              <value>org.sonar.java.jacoco.JUnitListener</value>
+            </property>
+          </properties>
+          <!-- Let's put failsafe reports with surefire to have access to tests failures/success reports in sonar -->
+          <!--<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>-->
+        </configuration>
         <executions>
           <execution>
             <goals>
@@ -193,9 +214,10 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
           <execution>
             <id>prepare-it-agent</id>
             <goals>
-              <goal>prepare-agent</goal>
+              <goal>prepare-agent-integration</goal>
             </goals>
             <configuration>
+              <append>true</append>
               <destFile>${sonar.jacoco.itReportPath}</destFile>
             </configuration>
           </execution>
@@ -204,15 +226,37 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
             <goals>
               <goal>report</goal>
             </goals>
+            <configuration>
+              <dataFile>${sonar.jacoco.reportPath}</dataFile>
+            </configuration>
           </execution>
           <execution>
             <id>default-report-integration</id>
             <goals>
               <goal>report-integration</goal>
             </goals>
+            <configuration>
+              <dataFile>${sonar.jacoco.itReportPath}</dataFile>
+            </configuration>
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <!-- Specific to generate mapping between tests and covered code -->
+          <!--<argLine>${jacoco.agent.ut.arg}</argLine>-->
+          <properties>
+            <property>
+              <name>listener</name>
+              <value>org.sonar.java.jacoco.JUnitListener</value>
+            </property>
+          </properties>
+          <!-- Let's put failsafe reports with surefire to have access to tests failures/success reports in sonar -->
+          <!--<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>-->
+        </configuration>
+      </plugin>
     </plugins>
   </build>
   <profiles>
index 42dbfa1f9f6f6c7c9455bbb78f8455ff00a88476..c8c50bcbbc663943ad0f07bf9df5b3eff360a7cb 100644 (file)
@@ -51,6 +51,9 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <ovsdb.utils.mdsal.openflow.version>1.2.0-SNAPSHOT</ovsdb.utils.mdsal.openflow.version>
     <ovsdb.utils.servicehelper.version>1.2.0-SNAPSHOT</ovsdb.utils.servicehelper.version>
     <powermock.version>1.5.2</powermock.version>
+    <sonar-jacoco-listeners.version>2.4</sonar-jacoco-listeners.version>
+    <root.directory>${env.PWD}</root.directory>
+    <sonar.jacoco.itReportPath>${root.directory}/target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
   </properties>
   <dependencies>
     <dependency>
@@ -176,6 +179,12 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <artifactId>junit</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.codehaus.sonar-plugins.java</groupId>
+      <artifactId>sonar-jacoco-listeners</artifactId>
+      <version>${sonar-jacoco-listeners.version}</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
   <build>
@@ -198,10 +207,34 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>
+        <configuration>
+          <!-- Specific to generate mapping between tests and covered code -->
+          <!--<argLine>${jacoco.agent.it.arg}</argLine>-->
+          <properties>
+          <property>
+          <name>listener</name>
+          <value>org.sonar.java.jacoco.JUnitListener</value>
+          </property>
+          </properties>
+          <!-- Let's put failsafe reports with surefire to have access to tests failures/success reports in sonar -->
+          <!--<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>-->
+        </configuration>
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <!-- Specific to generate mapping between tests and covered code -->
+          <!--<argLine>${jacoco.agent.ut.arg}</argLine>-->
+          <properties>
+            <property>
+              <name>listener</name>
+              <value>org.sonar.java.jacoco.JUnitListener</value>
+            </property>
+          </properties>
+          <!-- Let's put failsafe reports with surefire to have access to tests failures/success reports in sonar -->
+          <!--<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>-->
+        </configuration>
       </plugin>
       <plugin>
         <groupId>org.jacoco</groupId>
@@ -219,9 +252,10 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
           <execution>
             <id>prepare-it-agent</id>
             <goals>
-              <goal>prepare-agent</goal>
+              <goal>prepare-agent-integration</goal>
             </goals>
             <configuration>
+              <append>true</append>
               <destFile>${sonar.jacoco.itReportPath}</destFile>
             </configuration>
           </execution>
@@ -230,12 +264,18 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
             <goals>
               <goal>report</goal>
             </goals>
+            <configuration>
+              <dataFile>${sonar.jacoco.reportPath}</dataFile>
+            </configuration>
           </execution>
           <execution>
             <id>default-report-integration</id>
             <goals>
               <goal>report-integration</goal>
             </goals>
+            <configuration>
+              <dataFile>${sonar.jacoco.itReportPath}</dataFile>
+            </configuration>
           </execution>
         </executions>
       </plugin>
index 67a82936efce9e524fef117656abe1f7c0e10c94..0504655ba8a1a1fcfcc29828d6f56626a1cbf40a 100644 (file)
@@ -49,6 +49,9 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <ovsdb.utils.config.version>1.2.0-SNAPSHOT</ovsdb.utils.config.version>
     <ovsdb.utils.servicehelper.version>1.2.0-SNAPSHOT</ovsdb.utils.servicehelper.version>
     <powermock.version>1.5.2</powermock.version>
+    <sonar-jacoco-listeners.version>2.4</sonar-jacoco-listeners.version>
+    <root.directory>${env.PWD}</root.directory>
+    <sonar.jacoco.itReportPath>${root.directory}/target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
   </properties>
   <dependencies>
     <dependency>
@@ -155,6 +158,12 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <artifactId>junit</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.codehaus.sonar-plugins.java</groupId>
+      <artifactId>sonar-jacoco-listeners</artifactId>
+      <version>${sonar-jacoco-listeners.version}</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
   <build>
     <plugins>
@@ -180,10 +189,34 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>
+        <configuration>
+          <!-- Specific to generate mapping between tests and covered code -->
+          <!--<argLine>${jacoco.agent.it.arg}</argLine>-->
+          <properties>
+            <property>
+              <name>listener</name>
+              <value>org.sonar.java.jacoco.JUnitListener</value>
+            </property>
+          </properties>
+          <!-- Let's put failsafe reports with surefire to have access to tests failures/success reports in sonar -->
+          <!--<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>-->
+        </configuration>
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <!-- Specific to generate mapping between tests and covered code -->
+          <!--<argLine>${jacoco.agent.ut.arg}</argLine>-->
+          <properties>
+            <property>
+              <name>listener</name>
+              <value>org.sonar.java.jacoco.JUnitListener</value>
+            </property>
+          </properties>
+          <!-- Let's put failsafe reports with surefire to have access to tests failures/success reports in sonar -->
+          <!--<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>-->
+        </configuration>
       </plugin>
       <plugin>
         <groupId>org.jacoco</groupId>
@@ -201,9 +234,10 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
           <execution>
             <id>prepare-it-agent</id>
             <goals>
-              <goal>prepare-agent</goal>
+              <goal>prepare-agent-integration</goal>
             </goals>
             <configuration>
+              <append>true</append>
               <destFile>${sonar.jacoco.itReportPath}</destFile>
             </configuration>
           </execution>
@@ -212,12 +246,18 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
             <goals>
               <goal>report</goal>
             </goals>
+            <configuration>
+              <dataFile>${sonar.jacoco.reportPath}</dataFile>
+            </configuration>
           </execution>
           <execution>
             <id>default-report-integration</id>
             <goals>
               <goal>report-integration</goal>
             </goals>
+            <configuration>
+              <dataFile>${sonar.jacoco.itReportPath}</dataFile>
+            </configuration>
           </execution>
         </executions>
       </plugin>
index 243ee0ed0c3c32e3b51db5bc6011302d771a5279..0276059354f8438a5f04fab602f91305ff5f3b00 100644 (file)
@@ -128,7 +128,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
           <execution>
             <id>prepare-it-agent</id>
             <goals>
-              <goal>prepare-agent</goal>
+              <goal>prepare-agent-integration</goal>
             </goals>
             <configuration>
               <destFile>${sonar.jacoco.itReportPath}</destFile>
@@ -139,12 +139,18 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
             <goals>
               <goal>report</goal>
             </goals>
+            <configuration>
+              <dataFile>${sonar.jacoco.reportPath}</dataFile>
+            </configuration>
           </execution>
           <execution>
             <id>default-report-integration</id>
             <goals>
               <goal>report-integration</goal>
             </goals>
+            <configuration>
+              <dataFile>${sonar.jacoco.itReportPath}</dataFile>
+            </configuration>
           </execution>
         </executions>
       </plugin>
index 106b390c08e19cf8856a5103cdb2a30dc0cab9c1..511220dcd3679c91e7c9b7a5c488a3452735edde 100644 (file)
@@ -42,6 +42,9 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   </scm>
   <properties>
     <skip.integrationtest>true</skip.integrationtest>
+    <sonar-jacoco-listeners.version>2.4</sonar-jacoco-listeners.version>
+    <root.directory>${env.PWD}</root.directory>
+    <sonar.jacoco.itReportPath>${root.directory}/target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
   </properties>
   <dependencyManagement>
     <dependencies>
@@ -135,12 +138,30 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <artifactId>slf4j-simple</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.codehaus.sonar-plugins.java</groupId>
+      <artifactId>sonar-jacoco-listeners</artifactId>
+      <version>${sonar-jacoco-listeners.version}</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
   <build>
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>
+        <configuration>
+          <!-- Specific to generate mapping between tests and covered code -->
+          <!--<argLine>${jacoco.agent.it.arg}</argLine>-->
+          <properties>
+            <property>
+              <name>listener</name>
+              <value>org.sonar.java.jacoco.JUnitListener</value>
+            </property>
+          </properties>
+          <!-- Let's put failsafe reports with surefire to have access to tests failures/success reports in sonar -->
+          <!--<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>-->
+        </configuration>
         <executions>
           <execution>
             <goals>
@@ -154,6 +175,22 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <!-- Specific to generate mapping between tests and covered code -->
+          <!--<argLine>${jacoco.agent.ut.arg}</argLine>-->
+          <properties>
+            <property>
+              <name>listener</name>
+              <value>org.sonar.java.jacoco.JUnitListener</value>
+            </property>
+          </properties>
+          <!-- Let's put failsafe reports with surefire to have access to tests failures/success reports in sonar -->
+          <!--<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>-->
+        </configuration>
+      </plugin>
       <!-- Needed if you use versionAsInProject() -->
       <plugin>
         <groupId>org.apache.servicemix.tooling</groupId>
@@ -197,7 +234,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
           <execution>
             <id>prepare-it-agent</id>
             <goals>
-              <goal>prepare-agent</goal>
+              <goal>prepare-agent-integration</goal>
             </goals>
             <configuration>
               <destFile>${sonar.jacoco.itReportPath}</destFile>
@@ -208,12 +245,18 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
             <goals>
               <goal>report</goal>
             </goals>
+            <configuration>
+              <dataFile>${sonar.jacoco.reportPath}</dataFile>
+            </configuration>
           </execution>
           <execution>
             <id>default-report-integration</id>
             <goals>
               <goal>report-integration</goal>
             </goals>
+            <configuration>
+              <dataFile>${sonar.jacoco.itReportPath}</dataFile>
+            </configuration>
           </execution>
         </executions>
       </plugin>