This is an automated email from the ASF dual-hosted git repository. chinmayskulkarni pushed a commit to branch 4.x in repository https://gitbox.apache.org/repos/asf/phoenix.git
The following commit(s) were added to refs/heads/4.x by this push: new 182b2d3 PHOENIX-5842 Code Coverage tool for Phoenix 182b2d3 is described below commit 182b2d3445fa0667189bbf7bef9c0cf74fa341e4 Author: Sandeep Guggilam <sguggi...@sandeepg-ltm.internal.salesforce.com> AuthorDate: Tue May 5 20:26:35 2020 -0700 PHOENIX-5842 Code Coverage tool for Phoenix Signed-off-by: Chinmay Kulkarni <chinmayskulka...@apache.org> --- dev/test-patch.sh | 2 ++ pom.xml | 51 +++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 47 insertions(+), 6 deletions(-) diff --git a/dev/test-patch.sh b/dev/test-patch.sh index 090bf69..e36aa91 100755 --- a/dev/test-patch.sh +++ b/dev/test-patch.sh @@ -1108,6 +1108,8 @@ checkLineLengths if [[ $JENKINS == "true" ]] ; then runTests (( RESULT = RESULT + $? )) +JIRA_COMMENT_FOOTER="Code Coverage results: $BUILD_URL/artifact/phoenix-core/target/site/jacoco/index.html +$JIRA_COMMENT_FOOTER" JIRA_COMMENT_FOOTER="Test results: $BUILD_URL/testReport/ $JIRA_COMMENT_FOOTER" fi diff --git a/pom.xml b/pom.xml index 9d8e0d2..fbb295a 100644 --- a/pom.xml +++ b/pom.xml @@ -136,12 +136,15 @@ <maven-eclipse-plugin.version>2.9</maven-eclipse-plugin.version> <maven-build-helper-plugin.version>1.9.1</maven-build-helper-plugin.version> <maven-enforcer-plugin.version>3.0.0-M3</maven-enforcer-plugin.version> + <jacoco-maven-plugin.version>0.7.9</jacoco-maven-plugin.version> <!-- Plugin options --> <numForkedUT>8</numForkedUT> <numForkedIT>7</numForkedIT> <it.failIfNoSpecifiedTests>false</it.failIfNoSpecifiedTests> <surefire.failIfNoSpecifiedTests>false</surefire.failIfNoSpecifiedTests> + <!-- Empty argument when code coverage is deactivated --> + <jacocoArgLine></jacocoArgLine> <!-- Set default encoding so multi-byte tests work correctly on the Mac --> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> @@ -268,7 +271,7 @@ <reuseForks>true</reuseForks> <!--parallel>methods</parallel> <threadCount>20</threadCount--> - <argLine>-Xmx2000m -XX:MaxPermSize=256m -Djava.security.egd=file:/dev/./urandom "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" -XX:NewRatio=4 -XX:SurvivorRatio=8 -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:CMSInitiatingOccupancyFraction=68 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./target/</ [...] + <argLine>@{jacocoArgLine} -Xmx2000m -XX:MaxPermSize=256m -Djava.security.egd=file:/dev/./urandom "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" -XX:NewRatio=4 -XX:SurvivorRatio=8 -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:CMSInitiatingOccupancyFraction=68 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDum [...] <groups>org.apache.phoenix.end2end.ParallelStatsEnabledTest</groups> </configuration> <goals> @@ -290,7 +293,7 @@ at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.doGetTable(MetaDataEndpointImpl.java:2835) at org.apache.phoenix.coprocessor.MetaDataEndpointImpl.getTable(MetaDataEndpointImpl.java:490) --> <!--enableAssertions>false</enableAssertions--> - <argLine>-Xmx3000m -XX:MaxPermSize=256m -Djava.security.egd=file:/dev/./urandom "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" -XX:NewRatio=4 -XX:SurvivorRatio=8 -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:CMSInitiatingOccupancyFraction=68 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./target/</ [...] + <argLine>@{jacocoArgLine} -Xmx3000m -XX:MaxPermSize=256m -Djava.security.egd=file:/dev/./urandom "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" -XX:NewRatio=4 -XX:SurvivorRatio=8 -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:CMSInitiatingOccupancyFraction=68 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDum [...] <groups>org.apache.phoenix.end2end.ParallelStatsDisabledTest</groups> </configuration> <goals> @@ -302,7 +305,7 @@ <id>HBaseManagedTimeTests</id> <configuration> <reuseForks>true</reuseForks> - <argLine>-enableassertions -Xmx2000m -XX:MaxPermSize=128m -Djava.security.egd=file:/dev/./urandom "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./target/</argLine> + <argLine>@{jacocoArgLine} -enableassertions -Xmx2000m -XX:MaxPermSize=128m -Djava.security.egd=file:/dev/./urandom "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./target/</argLine> <groups>org.apache.phoenix.end2end.HBaseManagedTimeTest</groups> </configuration> <goals> @@ -314,7 +317,7 @@ <id>NeedTheirOwnClusterTests</id> <configuration> <reuseForks>false</reuseForks> - <argLine>-enableassertions -Xmx2000m -XX:MaxPermSize=256m -Djava.security.egd=file:/dev/./urandom "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./target/</argLine> + <argLine>@{jacocoArgLine} -enableassertions -Xmx2000m -XX:MaxPermSize=256m -Djava.security.egd=file:/dev/./urandom "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./target/</argLine> <groups>org.apache.phoenix.end2end.NeedsOwnMiniClusterTest</groups> </configuration> <goals> @@ -326,7 +329,7 @@ <id>SplitSystemCatalogTests</id> <configuration> <reuseForks>false</reuseForks> - <argLine>-enableassertions -Xmx2000m -XX:MaxPermSize=256m -Djava.security.egd=file:/dev/./urandom "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./target/</argLine> + <argLine>@{jacocoArgLine} -enableassertions -Xmx2000m -XX:MaxPermSize=256m -Djava.security.egd=file:/dev/./urandom "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./target/</argLine> <groups>org.apache.phoenix.end2end.SplitSystemCatalogTests</groups> </configuration> <goals> @@ -476,7 +479,7 @@ <configuration> <forkCount>${numForkedUT}</forkCount> <reuseForks>true</reuseForks> - <argLine>-enableassertions -Xmx2250m -XX:MaxPermSize=128m + <argLine>@{jacocoArgLine} -enableassertions -Xmx2250m -XX:MaxPermSize=128m -Djava.security.egd=file:/dev/./urandom "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./target/</argLine> <redirectTestOutputToFile>${test.output.tofile}</redirectTestOutputToFile> <shutdown>kill</shutdown> @@ -1213,6 +1216,42 @@ <hbase.version>1.3.5</hbase.version> </properties> </profile> + <profile> + <id>codecoverage</id> + <activation> + <property> + <name>code.coverage</name> + <value>!deactivate</value> + </property> + </activation> + <build> + <plugins> + <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> + </goals> + <configuration> + <propertyName>jacocoArgLine</propertyName> + </configuration> + </execution> + <execution> + <id>report</id> + <phase>post-integration-test</phase> + <goals> + <goal>report</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> </profiles> <reporting>