You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ra...@apache.org on 2020/09/22 18:16:48 UTC

[sling-org-apache-sling-graphql-core] branch master updated: trivial: collect code coverage from both unit and it tests

This is an automated email from the ASF dual-hosted git repository.

radu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-graphql-core.git


The following commit(s) were added to refs/heads/master by this push:
     new b698665  trivial: collect code coverage from both unit and it tests
b698665 is described below

commit b698665b9e6a1639f41d23040d46925f2c2d599f
Author: Radu Cotescu <co...@adobe.com>
AuthorDate: Tue Sep 22 20:09:29 2020 +0200

    trivial: collect code coverage from both unit and it tests
---
 pom.xml | 43 +++++++++++++++++++++++++++++--------------
 1 file changed, 29 insertions(+), 14 deletions(-)

diff --git a/pom.xml b/pom.xml
index 4684bc1..fc87efb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -39,11 +39,10 @@
     <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
 
     <org.ops4j.pax.exam.version>4.13.3</org.ops4j.pax.exam.version>
+    <jacoco.maven.plugin.version>0.8.2</jacoco.maven.plugin.version>
 
-    <argLine/>
-
-    <!-- this default setting allows collecting coverage info during IT -->
-    <pax.vm.options>${argLine}</pax.vm.options>
+    <!-- additional options that can be passed to Pax before executing the tests -->
+    <pax.vm.options/>
   </properties>
 
   <scm>
@@ -68,6 +67,27 @@
         </configuration>
       </plugin>
       <plugin>
+        <groupId>org.jacoco</groupId>
+        <artifactId>jacoco-maven-plugin</artifactId>
+        <version>${jacoco.maven.plugin.version}</version>
+        <executions>
+          <execution>
+            <id>prepare-agent</id>
+            <goals>
+              <goal>prepare-agent</goal>
+              <goal>prepare-agent-integration</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+        <configuration>
+          <argLine>@{argLine}</argLine>
+        </configuration>
+      </plugin>
+      <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>
         <executions>
@@ -79,19 +99,14 @@
           </execution>
         </executions>
         <configuration>
+          <argLine>@{argLine}</argLine>
+          <systemPropertyVariables>
+            <bundle.filename>${basedir}/target/${project.build.finalName}.jar</bundle.filename>
+            <pax.vm.options>${pax.vm.options}</pax.vm.options>
+          </systemPropertyVariables>
           <redirectTestOutputToFile>true</redirectTestOutputToFile>
           <!-- pax exam bug, often times out at exit -->
           <forkedProcessExitTimeoutInSeconds>1</forkedProcessExitTimeoutInSeconds>
-          <systemProperties>
-            <property>
-              <name>bundle.filename</name>
-              <value>${basedir}/target/${project.build.finalName}.jar</value>
-            </property>
-            <property>
-              <name>pax.vm.options</name>
-              <value>${pax.vm.options}</value>
-            </property>
-          </systemProperties>
         </configuration>
       </plugin>
       <plugin>