RFR: Add build support for generating Jacoco coverage reports [v2]
Jorn Vernee
jvernee at openjdk.org
Mon Dec 4 22:06:16 UTC 2023
> 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.
>
> 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`.
Jorn Vernee has updated the pull request incrementally with one additional commit since the last revision:
lazily configure coverage task
-------------
Changes:
- all: https://git.openjdk.org/jextract/pull/153/files
- new: https://git.openjdk.org/jextract/pull/153/files/0d019131..83f60913
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jextract&pr=153&range=01
- incr: https://webrevs.openjdk.org/?repo=jextract&pr=153&range=00-01
Stats: 14 lines in 1 file changed: 0 ins; 4 del; 10 mod
Patch: https://git.openjdk.org/jextract/pull/153.diff
Fetch: git fetch https://git.openjdk.org/jextract.git pull/153/head:pull/153
PR: https://git.openjdk.org/jextract/pull/153
More information about the jextract-dev
mailing list