From 34655c67a8efe1b8eb83d51a1e0efca10c6603ca Mon Sep 17 00:00:00 2001 From: Alexander Matveev Date: Thu, 31 Oct 2024 22:18:26 +0000 Subject: [PATCH] 8342544: [macos] jpackage test helper should check for both "--app-image" and "--mac-sign" for signing predefined app image case Reviewed-by: asemenyuk --- .../helpers/jdk/jpackage/test/JPackageCommand.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java b/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java index 18384db34db..99cb61b17d3 100644 --- a/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java +++ b/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java @@ -408,12 +408,14 @@ public final class JPackageCommand extends CommandArguments { public Path outputBundle() { final String bundleName; if (isImagePackageType()) { - if (TKit.isOSX() && hasArgument("--app-image")) { - return Path.of(getArgumentValue("--app-image", () -> null)); - } - String dirName = name(); - if (TKit.isOSX()) { - dirName = dirName + ".app"; + String dirName; + if (!TKit.isOSX()) { + dirName = name(); + } else if (hasArgument("--app-image") && hasArgument("--mac-sign")) { + // Request to sign external app image, not to build a new one + dirName = getArgumentValue("--app-image"); + } else { + dirName = name() + ".app"; } bundleName = dirName; } else if (TKit.isLinux()) {