RFR: 8356575: Test order in which jpackage fills app image [v2]

Alexey Semenyuk asemenyuk at openjdk.org
Wed Oct 15 23:03:41 UTC 2025


On Wed, 15 Oct 2025 22:35:22 GMT, Alexander Matveev <almatvee at openjdk.org> wrote:

> Looks good. I do not see test case which covers `.jpackage.xml`. Can we add one?

`testAppImageFile()` test case covers ".jpackage.xml" file. It creates a custom ".jpackage.xml" in the input app content directory and verifies jpackage ignores it and writes the default ".jpackage.xml" file into the output app image:


[19:17:07.408] TRACE: Create [C:\scratch\testAppImageFile\app-content\app.jpackage.xml] text file...
[19:17:07.408] TRACE: This is not a valid XML content
[19:17:07.408] TRACE: Done
...
[19:17:07.513] TRACE: exec: Execute [c:\work_dir\windows-x64.jdk\jdk-26\bin\jpackage.exe --input testAppImageFile\input --dest testAppImageFile\output --name Foo --type app-image --main-jar hello.jar --main-class Hello --win-console --app-content testAppImageFile\app-content\app --runtime-image testAppImageFile\fake_runtime -J-Djlink.debug=true --verbose](20); inherit out+err...
...
[19:17:08.353] TRACE: assertStringListEquals(): Check jpackage didn't modify ${APP_CONTENT}=[C:\scratch\testAppImageFile\app-content\app]
[19:17:08.353] TRACE: assertStringListEquals(1, #)
[19:17:08.353] TRACE: assertStringListEquals(2, .jpackage.xml#2025-10-15T19:17:07.4085145Z)
...
[19:17:08.355] TRACE: assertStringListEquals(): Check there is only one file with [.jpackage.xml] name in the package
[19:17:08.355] TRACE: assertStringListEquals(1, testAppImageFile\output\Foo\app.jpackage.xml)
...
[19:17:08.408] TRACE: Parse [testAppImageFile\output\Foo\app.jpackage.xml] file...

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

PR Comment: https://git.openjdk.org/jdk/pull/27826#issuecomment-3408582012


More information about the core-libs-dev mailing list