RFR: 8358017: Various enhancements of jpackage test helpers

Alexey Semenyuk asemenyuk at openjdk.org
Thu May 29 16:24:30 UTC 2025


Various enhancements of jpackage test helpers:
 - Can run fa tests when JAVA_TOOL_OPTIONS env variable contains `--module-path` option. This change makes support for `jpackage.test.clear-app-launcher-java-env-vars` system property redundant.
 - Rework JUnitAdapter to make it run jpackage TestInstance objects as JUnit5 DynamicTest tests. This integrates jpackage test runs in IDEs (Verified with Eclipse IDE).
 - Make jpackage tests fail fast when they are executed by JUnit test runner.
 - Applied `./bin/blessed-modifier-order.sh` script on jpackage test helpers.
 - Support loading jpackage tests from a custom classloader.
 - Add support for using a custom ToolProvider implementation of jpackage with JPackageCommand.

The last two features are not currently in use. They were picked from the work-in-progress [JDK-8333727](https://bugs.openjdk.org/browse/JDK-8333727).

-------------

Commit messages:
 - Fix modifier order
 - Update copyright year
 - Can configure what ToolProvider to use with JPackageCommand
 - Support loading tests from a custom classloader
 - Rework JUnitAdapter to make it run jpackage TestInstance objects as JUnit5 DynamicTest tests. Additionally make the fields of TestInstance.TestDesc class final. Make jpackage tests fail fast when they are executed by JUnit. Add TKit.runAdhocTest() methods. Make JUnitAdapter use them.
 - Can run fa tests when JAVA_TOOL_OPTIONS variable is set.

Changes: https://git.openjdk.org/jdk/pull/25479/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25479&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8358017
  Stats: 199 lines in 13 files changed: 120 ins; 27 del; 52 mod
  Patch: https://git.openjdk.org/jdk/pull/25479.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25479/head:pull/25479

PR: https://git.openjdk.org/jdk/pull/25479


More information about the core-libs-dev mailing list