Integrated: Add build support for generating Jacoco coverage reports
Jorn Vernee
jvernee at openjdk.org
Tue Dec 5 12:32:05 UTC 2023
On Mon, 4 Dec 2023 21:55:53 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
> Add a new `coverage` gradle task that can be used to generate a Jacoco test coverage report. Because we're on the bleeding edge, the user running the build needs to build Jacoco from source for this to work. Though, this is optional.
>
> As an example: I've cloned Jacoco from here: https://github.com/jacoco/jacoco and built the project using:
>
> mvn package -DskipTests -Dbytecode.version=22
>
> Then, I point gradle at the generated artifacts using:
>
> jacoco_cli=<jacoco repo>/org.jacoco.cli/target/org.jacoco.cli-0.8.12-SNAPSHOT-nodeps.jar
> jacoco_agent=<jacoco repo>/org.jacoco.agent/target/classes/jacocoagent.jar
>
> I've put these in a local `gradle.properties` file instead of passing them on the command line.
>
> I then run `./gradlew coverage` which generates an html coverage report under `./build/jacoco-report`.
This pull request has now been integrated.
Changeset: 4b0e8fe9
Author: Jorn Vernee <jvernee at openjdk.org>
URL: https://git.openjdk.org/jextract/commit/4b0e8fe9a2af4b5c72b7c09ce424dfc72183e2cd
Stats: 49 lines in 1 file changed: 36 ins; 3 del; 10 mod
Add build support for generating Jacoco coverage reports
Reviewed-by: mcimadamore
-------------
PR: https://git.openjdk.org/jextract/pull/153
More information about the jextract-dev
mailing list