RFR: 8370122: jpackage test lib improvements [v4]
Alexey Semenyuk
asemenyuk at openjdk.org
Tue Oct 21 15:30:19 UTC 2025
> Assorted updates to jpackage test lib:
>
> - Use `--release 11` javac option to compile test app. This allows custom runtimes created from older JDKs to be used. Using external runtimes allows to avoid jpackage running jlink in every test and saves time in local tests. With this change, creating a single stub runtime and using it with jpackage tests across multiple releases is possible.
> - Add "JUnitUtils" helper.
> - Add "ObjectMapper" class that converts a given object into a property map (`Map<String, Object>`). Handy to create a dump of object hierarchies.
> - Add "ConfigurationTarget" class to simplify applying the same initializers when testing app image and native package bundling.
> - Fix "AppImagePackageTest" test to make it produce a valid macOS bundle to leverage the default verification of jpackage output in the jpackage test lib.
> - Add test cases for the main/additional launcher descriptions to AddLauncherTest test.
> - Add validation of the "Comment" key value in Linux .desktop files.
Alexey Semenyuk has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains 12 new commits since the last revision:
- AddLauncherTest: add test cases for the main/additional launcher descriptions
- AppImagePackageTest: better logging; ObjectMapper: fix a warning
- jpackage test lib: assorted improvements; LinuxHelper: validate "Comment" property of a .desktop file
- IdentityWrapper: trim trailing whitespace
- Move IdentityWrapper to jdk.jpackage.internal.util package for later use by CompositeProxy
- ApplicationLayout: runtime layout should have a valid "runtimeHome" property
- Fix the merge
- LinuxHelper: revamp
- AppImagePackageTest: make it produce a valid mac bundle to leverage the default verification of jpackage output in jpackage test lib.
- AdditionalLauncher: make getAdditionalLauncherProperties() public; LauncherIconVerifier: make setters unambiguous; Add ConfigurationTarget
- ... and 2 more: https://git.openjdk.org/jdk/compare/58f206b4...cad3e788
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/27872/files
- new: https://git.openjdk.org/jdk/pull/27872/files/58f206b4..cad3e788
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=27872&range=03
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=27872&range=02-03
Stats: 8 lines in 1 file changed: 0 ins; 0 del; 8 mod
Patch: https://git.openjdk.org/jdk/pull/27872.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/27872/head:pull/27872
PR: https://git.openjdk.org/jdk/pull/27872
More information about the core-libs-dev
mailing list