You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bazel's default method for running Java tests involves a custom runner and potentially a custom launcher; for native test cases, no launcher is needed at all, but the runner is still needed.
Additionally, GraalVM provides its own runner implementation which discovers JUnit tests in a native binary.
To invoke this code path properly, we probably need to introduce our own runner, which reads the Bazel runner from a new system property (bazel.graalvm.wrapped_testrunner), and then performs the following steps:
Load the class at bazel.graalvm.wrapped_testrunner, or fallback to default (com.google.testing.junit.runner.BazelTestRunner)
Read the test suite target from bazel.test_suite
Invoke initialization steps in org.graalvm.junit.platform.NativeImageJUnitLauncher, or otherwise repeat that code
Invoke initialization steps and pass control over to the wrapped runner
There is some other ceremony related to testing:
The native-image build for the test needs --features=org.graalvm.junit.platform.JUnitPlatformFeature
The runner class will need to be registered for reflection. Since this is dynamic, we will need a Feature for this as well
The text was updated successfully, but these errors were encountered:
Bazel's default method for running Java tests involves a custom runner and potentially a custom launcher; for native test cases, no launcher is needed at all, but the runner is still needed.
Additionally, GraalVM provides its own runner implementation which discovers JUnit tests in a native binary.
To invoke this code path properly, we probably need to introduce our own runner, which reads the Bazel runner from a new system property (
bazel.graalvm.wrapped_testrunner
), and then performs the following steps:bazel.graalvm.wrapped_testrunner
, or fallback to default (com.google.testing.junit.runner.BazelTestRunner
)bazel.test_suite
org.graalvm.junit.platform.NativeImageJUnitLauncher
, or otherwise repeat that codeThere is some other ceremony related to testing:
native-image
build for the test needs--features=org.graalvm.junit.platform.JUnitPlatformFeature
Feature
for this as wellThe text was updated successfully, but these errors were encountered: