Skip to content

Commit

Permalink
Enable JaCoCo coverage report
Browse files Browse the repository at this point in the history
  • Loading branch information
trustin committed Jul 15, 2016
1 parent ad742dd commit 94afbd1
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,8 @@ install:
- true

script:
- mvn -V -B test site
- mvn -V -B -Pcoverage test site

after_success:
- bash <(curl -s https://codecov.io/bash)

38 changes: 37 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@
<jetty.alpnAgent.version>2.0.3</jetty.alpnAgent.version>
<jetty.alpnAgent.path>${settings.localRepository}/org/mortbay/jetty/alpn/jetty-alpn-agent/${jetty.alpnAgent.version}/jetty-alpn-agent-${jetty.alpnAgent.version}.jar</jetty.alpnAgent.path>
<argLine.alpnAgent>-javaagent:${jetty.alpnAgent.path}</argLine.alpnAgent>
<argLine.coverage>-D_</argLine.coverage> <!-- Overridden when 'coverage' profile is active -->
<argLine.leak>-D_</argLine.leak> <!-- Overridden when 'leak' profile is active -->
<argLine.memOpts>-Xmx128m</argLine.memOpts>
<thrift.executable>${project.basedir}/src/build/thrift.${os.detected.classifier}</thrift.executable>
<thrift.source.main>${project.basedir}/src/main/thrift</thrift.source.main>
<thrift.source.test>${project.basedir}/src/test/thrift</thrift.source.test>
Expand Down Expand Up @@ -572,7 +574,7 @@
<exclude>**/TestUtil*</exclude>
</excludes>
<runOrder>random</runOrder>
<argLine>${argLine.alpnAgent} ${argLine.leak} -Xmx128m</argLine>
<argLine>${argLine.memOpts} ${argLine.alpnAgent} ${argLine.coverage} ${argLine.leak}</argLine>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -733,5 +735,39 @@
<argLine.leak>-Dio.netty.leakDetectionLevel=paranoid</argLine.leak>
</properties>
</profile>
<profile>
<id>coverage</id>
<properties>
<argLine.memOpts>-Xmx384m</argLine.memOpts>
<argLine.coverage>@{jacoco.argLine}</argLine.coverage>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.7.201606060606</version>
<executions>
<execution>
<id>jacoco-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<propertyName>jacoco.argLine</propertyName>
</configuration>
</execution>
<execution>
<id>jacoco-report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit 94afbd1

Please sign in to comment.