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
The GraalVM Native Build Tools (NBT) project provides support for running tests within a native image using the JUnit Platform. Since JUnit 5 has never provided built-in support for running in a native image, the NBT team implemented an internal PluginConfigProvider mechanism for contributing native image configuration for the JUnit Platform, JUnit Jupiter, and JUnit Vintage projects.
The code in the above classes is very specific to JUnit 5 and can therefore be better maintained by the JUnit team. In addition, having the native image configuration directly in JUnit 5 artifacts will allow the JUnit team to proactively integration test support for GraalVM native images, thereby avoiding issues such as #3035.
Deliverables
Add a new section on GraalVM native image support in the User Guide -- for example, in the "Running Tests" section.
Introduce integration tests that run on the CI server which verify support for GraalVM native images without using Native Build Tools (as a companion to recently introduced integration tests that use NBT) -- for example, using the ConsoleLauncher as the application class for the compiled native image.
Avoid build-time initialization in JUnit 5 wherever feasible and list the remaining classes in native-image.properties of each jar
Determine how much of the functionality in the PluginConfigProvider implementations in NBT can be migrated to JUnit 5.
Determine how much of the functionality in the JUnitPlatformFeature and its support classes can be migrated to JUnit 5.
The text was updated successfully, but these errors were encountered:
+1 for this. The breaking change in 5.10 that requires --initialize-at-build-time for two classes would be avoided if appropriate native-image.properties files were were included in the relevant jars.
Overview
The GraalVM Native Build Tools (NBT) project provides support for running tests within a native image using the JUnit Platform. Since JUnit 5 has never provided built-in support for running in a native image, the NBT team implemented an internal
PluginConfigProvider
mechanism for contributing native image configuration for the JUnit Platform, JUnit Jupiter, and JUnit Vintage projects.PlatformConfigProvider
JupiterConfigProvider
VintageConfigProvider
The
JUnitPlatformFeature
also registers reflection for all test classes.Rationale
The code in the above classes is very specific to JUnit 5 and can therefore be better maintained by the JUnit team. In addition, having the native image configuration directly in JUnit 5 artifacts will allow the JUnit team to proactively integration test support for GraalVM native images, thereby avoiding issues such as #3035.
Deliverables
ConsoleLauncher
as the application class for the compiled native image.native-image.properties
of each jarPluginConfigProvider
implementations in NBT can be migrated to JUnit 5.JUnitPlatformFeature
and its support classes can be migrated to JUnit 5.The text was updated successfully, but these errors were encountered: