RFR: 8351095: [macos] Add more jpackage tests for --mac-app-store option
Alexey Semenyuk
asemenyuk at openjdk.org
Tue Nov 25 16:59:06 UTC 2025
On Tue, 25 Nov 2025 03:58:17 GMT, Alexander Matveev <almatvee at openjdk.org> 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 1:
> 1: /*
I think the only required change to this source should be:
--- a/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherAsServiceVerifier.java
+++ b/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherAsServiceVerifier.java
@@ -239,7 +239,9 @@ private static Map<Boolean, List<String>> partitionLaunchers(JPackageCommand cmd
}
static boolean launcherAsService(JPackageCommand cmd, String launcherName) {
- if (cmd.isMainLauncher(launcherName)) {
+ if (cmd.hasArgument("--mac-app-store")) {
+ return false;
+ } else if (cmd.isMainLauncher(launcherName)) {
return PropertyFinder.findLauncherProperty(cmd, null,
PropertyFinder.cmdlineBooleanOption("--launcher-as-service"),
PropertyFinder.nop(),
It will also make the change in PackageTest.java redundant.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28487#discussion_r2560749800
More information about the core-libs-dev
mailing list