Fix custom native test classpath wiring#925
Draft
jormundur00 wants to merge 1 commit into
Draft
Conversation
ec7ae54 to
412ae65
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #702
Spec fit
Issue 702 is compatible with the Gradle native-test contract: a custom native test binary registered
with
registerTestBinaryshould derive classes, resources, runtime classpath, test identifiers, andJUnit native support from the configured source set and
Testtask. This PR adds the explicitcustom-test spec point for that behavior and cites it from the Gradle plugin implementation and
functional regression coverage.
Implementation summary
FS-gradle-native-tests.1.1for custom native test binaries.configuration instead of always using the default
testRuntimeClasspath.nativeImageIntegTestClasspathincludes the customsource set project/JUnit dependencies and plugin-provided
junit-platform-native.testconfigurations, avoiding the masking behavior from the original bug.
Validation evidence
JAVA_HOME=/home/jovan/.sdkman/candidates/java/17.0.12-graal ./gradlew :native-gradle-plugin:functionalTest --tests "org.graalvm.buildtools.gradle.JavaApplicationWithTestsFunctionalTest.custom test image classpath follows custom source set"JAVA_HOME=/home/jovan/.sdkman/candidates/java/17.0.12-graal ./gradlew :native-gradle-plugin:functionalTest --tests "org.graalvm.buildtools.gradle.JavaApplicationWithTestsFunctionalTest.can register a custom test image"JAVA_HOME=/home/jovan/.sdkman/candidates/java/17.0.12-graal ./gradlew :native-gradle-plugin:test :native-gradle-plugin:inspectionsJAVA_HOME=/home/jovan/.sdkman/candidates/java/17.0.12-graal ./gradlew :native-gradle-plugin:configCacheFunctionalTest --tests "org.graalvm.buildtools.gradle.JavaApplicationWithTestsFunctionalTest.custom test image classpath follows custom source set"git diff --checkgrund gradle/FS-gradle-native-tests.1.1 --briefgrund checkwas also run and failed only on pre-existing outdated grund init blocks in repositoryAGENTS.mdfiles. The new spec section resolves directly. Full Gradle functional matrices, fullrepository build, and an issue-specific native-image compile/runtime execution were not run locally.
Review readiness
Local aggregate review found no requirements, spec/grund, implementation, or blocking validation
findings. Ready to publish: yes.
Remaining human follow-up
coverage before marking the PR ready.
grund checkisrequired for repository maintenance.