Skip to content

Commit

Permalink
Fix jacoco reports for yang parser and pgsql schema generator
Browse files Browse the repository at this point in the history
Yang parser and pgsql schema generator jacoco report generation fixed

Issue-ID: SMO-154
Change-Id: I25c3ba220d090c185652e31b2d8ed17ca34402b6
Signed-off-by: aravind.est <[email protected]>
  • Loading branch information
aravindtga committed Jul 1, 2024
1 parent cf95417 commit ea1ce62
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 28 deletions.
44 changes: 44 additions & 0 deletions pgsql-schema-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,50 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${version.jacoco-maven.plugin}</version>
<configuration>
<append>true</append>
</configuration>
<executions>
<execution>
<id>jacoco-check</id>
<goals>
<goal>check</goal>
</goals>
<phase>test</phase>
<configuration>
<rules>
<rule implementation="org.jacoco.maven.RuleConfiguration">
<element>BUNDLE</element>
<limits>
<limit implementation="org.jacoco.report.check.Limit">
<counter>INSTRUCTION</counter>
<value>COVEREDRATIO</value>
<minimum>${jacoco-maven-plugin.coveredratio.minimum}</minimum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
<execution>
<id>prepare-unit-tests</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>verify</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
72 changes: 44 additions & 28 deletions yang-parser/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,37 +193,53 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${version.jacoco-maven.plugin}</version>
<configuration>
<append>true</append>
</configuration>
<executions>
<execution>
<id>jacoco-check</id>
<goals>
<goal>check</goal>
</goals>
<phase>test</phase>
<configuration>
<rules>
<rule implementation="org.jacoco.maven.RuleConfiguration">
<element>BUNDLE</element>
<limits>
<limit implementation="org.jacoco.report.check.Limit">
<counter>INSTRUCTION</counter>
<value>COVEREDRATIO</value>
<minimum>${jacoco-maven-plugin.coveredratio.minimum}</minimum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
<execution>
<id>prepare-unit-tests</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>verify</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.4</version>
<executions>
<execution>
<id>prepare-unit-tests</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
<configuration>
<outputDirectory>${project.build.directory}/coverage-reports/jacoco</outputDirectory>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>


<dependencies>
<dependency>
<groupId>junit</groupId>
Expand Down

0 comments on commit ea1ce62

Please sign in to comment.