On Tue, 25 Nov 2025 03:58:17 GMT, Alexander Matveev <[email protected]> 
wrote:

> Added following tests:
> - Verify mac app store PKG doesn't have scripts (added to 
> `PkgScriptsTest.java`).
> - `--launcher-as-service` ignored for mac app store PKG  (added to 
> `ServiceTest.java`).
> - `--launcher-as-service` for additional launcher ignored for mac app store 
> PKG (added to `ServiceTest.java`).

test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherAsServiceVerifier.java
 line 313:

> 311: 
> 312:     public void verifyLauncherExecuted(JPackageCommand cmd) {
> 313:         if (canVerifyInstall(cmd) && 
> !cmd.hasArgument("--mac-app-store")) {

This is a public function intended for explicit calls from tests.
If a test calls it, it assumes a launcher will be executed unless an 
uncontrolled condition prevents it. The most common such condition is when the 
test unpacks a package instead of installing it.
The set of options on the jpackage command line is fully controlled by the 
test. So if it adds the "--mac-app-store" option, it should not call this 
function. That said, the change to this function is redundant

test/jdk/tools/jpackage/share/ServiceTest.java line 229:

> 227:             
> appImageCmd.cmd().orElseThrow().addArgument("--mac-app-store");
> 228:         }
> 229: 

Why do we need this option for an app image?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28487#discussion_r2560829902
PR Review Comment: https://git.openjdk.org/jdk/pull/28487#discussion_r2560835901

Reply via email to