-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: DH-18477: Java coverage generated conditionally #6586
base: main
Are you sure you want to change the base?
build: DH-18477: Java coverage generated conditionally #6586
Conversation
buildSrc/src/main/groovy/io.deephaven.java-test-conventions.gradle
Outdated
Show resolved
Hide resolved
buildSrc/src/main/groovy/io.deephaven.java-jacoco-conventions.gradle
Outdated
Show resolved
Hide resolved
buildSrc/src/main/groovy/io.deephaven.java-jacoco-conventions.gradle
Outdated
Show resolved
Hide resolved
// Apply Jacoco instrumentation and coverage reporting | ||
if (project.findProperty('coverage.enabled') == 'true') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@niloc132; I wonder if we should unconditionally apply the jacoco plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would that affect things like JMH because of instrumentation?
buildSrc/src/main/groovy/io.deephaven.java-jacoco-conventions.gradle
Outdated
Show resolved
Hide resolved
buildSrc/src/main/groovy/io.deephaven.java-jacoco-conventions.gradle
Outdated
Show resolved
Hide resolved
jacoco { | ||
destinationFile = layout.buildDirectory.file('jacoco/jacoco.exec').get().asFile | ||
} | ||
finalizedBy jacocoTestReport | ||
} | ||
|
||
jacocoTestReport { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may need to look into hooking up integration tests as part of the coverage path. Right now, it seems like only the "test" task is included for the reporting. https://docs.gradle.org/current/userguide/jacoco_plugin.html#sec:jacoco_tasks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the README.md I have the expected command line for running everything. Are there more than check, testSerial, testParallel, testOutOfBand? How to I run anything that's missing?
Java coverage in the DHC build with Jacoco was broken at some point. Fixed that and added coverage merge. Full coverage can be run and merged with the following:
This produces HTML, CSV, XML coverage artifacts at the Java project level. It also produces a merged HTML site in the root "build/reports" directory.
If the "coverage.enabled" property is not supplied or is false, "check" will run as usual without instrumentation.
Jira: https://deephaven.atlassian.net/browse/DH-18477