On Sat, 23 May 2026 01:12:25 GMT, Alexander Matveev <[email protected]> 
wrote:

> - To avoid issues with `osascript` timeouts during testing DMG Script from 
> `jpackage` will be overwritten by no-op script.
> - If -Djpackage.test.SQETest=yes is specified DMG script will not be 
> overwritten.
> 
> 
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Changes requested by asemenyuk (Reviewer).

How is `jpackage.test.SQETest` related to disabling the default osascript?

I'd rather introduce a separate boolean property, say 
`jpackage.test.enable-default-dmg-osascript`. If the property is unset or set 
to a value that evaluates to a boolean "false", disable the default jpackage's 
osascript. You can connect it to `jpackage.test.SQETest` if you think they are 
related. Something like:


private final static boolean ENABLE_DEFAULT_DMG_OSASCRIPT = 
TKit.getConfigBooleanProperty("enable-default-dmg-osascript").orElseGet(() -> {
    return TKit.getConfigBooleanProperty("SQETest").orElese(false);
});

class TKit {
    ...
    static Optional<Boolean> getConfigBooleanProperty(String propertyName) {
        return 
Optional.ofNullable(getConfigProperty(propertyName)).map(Boolean::valueOf);
    }
}

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

PR Review: https://git.openjdk.org/jdk/pull/31265#pullrequestreview-4366291966
PR Comment: https://git.openjdk.org/jdk/pull/31265#issuecomment-4547232107

Reply via email to