Try #2 to get jacoco to report integration results 09/22709/4
authorRyan Moats <rmoats@us.ibm.com>
Tue, 16 Jun 2015 15:25:55 +0000 (10:25 -0500)
committerRyan Moats <rmoats@us.ibm.com>
Tue, 16 Jun 2015 17:44:29 +0000 (12:44 -0500)
Change-Id: Ia3943c9a560483ac03ed506693df4a65b9d36c05
Signed-off-by: Ryan Moats <rmoats@us.ibm.com>
integration/test/pom.xml
integration/test/src/test/java/org/opendaylight/neutron/e2etest/ITNeutronE2E.java [moved from integration/test/src/test/java/org/opendaylight/neutron/e2etest/NeutronE2ETest.java with 99% similarity]
parent/pom.xml

index a4f07cb6356f419e5d2656bebd3b1ff3158857ef..d7694dfa832de1271a4a4e826ad191e467f01505 100644 (file)
         </configuration>
         <executions>
           <execution>
-            <id>pre-test</id>
+            <id>pre-integration-test</id>
+            <phase>pre-integration-test</phase>
             <goals>
               <goal>prepare-agent</goal>
             </goals>
+            <configuration>
+              <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
+              <propertyName>failsafeArgLine</propertyName>
+            </configuration>
           </execution>
           <execution>
-            <id>post-test</id>
+            <id>post-integration-test</id>
+            <phase>post-integration-test</phase>
             <goals>
               <goal>report</goal>
             </goals>
-            <phase>test</phase>
+            <configuration>
+              <dataFile>${project.build.directory}/coverage-reports/jacoco-it.exec</dataFile>
+              <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <artifactId>maven-failsafe-plugin</artifactId>
+        <version>${failsafe.version}</version>
+        <executions>
+          <execution>
+            <id>integration-tests</id>
+            <phase>integration-test</phase>
+            <goals>
+              <goal>integration-test</goal>
+              <goal>verify</goal>
+            </goals>
+            <configuration>
+              <argLine>${failsafeArgLine}</argLine>
+              <skipTests>${skip.integration.tests}</skipTests>
+            </configuration>
           </execution>
         </executions>
       </plugin>
similarity index 99%
rename from integration/test/src/test/java/org/opendaylight/neutron/e2etest/NeutronE2ETest.java
rename to integration/test/src/test/java/org/opendaylight/neutron/e2etest/ITNeutronE2E.java
index 97df7803058f62987058d63282a102bf9ff469f1..67897729bbde809b3558d9728d3a3210d790906a 100644 (file)
@@ -37,7 +37,7 @@ import org.osgi.framework.BundleContext;
 import org.osgi.service.cm.ConfigurationAdmin;
 
 @RunWith(PaxExam.class)
-public class NeutronE2ETest {
+public class ITNeutronE2E {
 
     @Inject
     private BundleContext bundleContext;
index 6939f5cfa9a361d264deea934d8243125b2694c6..99d37c421e3d226bfe12dc6a1275173c38cacb06 100644 (file)
           <artifactId>maven-bundle-plugin</artifactId>
           <version>${maven.bundle.version}</version>
         </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>${maven.surefire.version}</version>
+          <configuration>
+            <argLine>${surefireArgLine}</argLine>
+            <skipTests>${skip.unit.tests}</skipTests>
+            <excludes>
+               <exclude>**/IT*.java</exclude>
+            </excludes>
+          </configuration>
+        </plugin>
       </plugins>
     </pluginManagement>
     <plugins>
             <goals>
               <goal>prepare-agent</goal>
             </goals>
+            <configuration>
+              <destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
+              <propertyName>surefireArgLine</propertyName>
+            </configuration>
           </execution>
           <execution>
             <id>post-test</id>
             <goals>
               <goal>report</goal>
             </goals>
+            <configuration>
+                <dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
+                <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
+            </configuration>
             <phase>test</phase>
           </execution>
         </executions>