Skip to content

Commit 8a8893e

Browse files
author
Alexey Semenyuk
committed
8356562: SigningAppImageTwoStepsTest test fails
Reviewed-by: almatvee
1 parent c2a4fa1 commit 8a8893e

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,12 +1001,8 @@ private boolean expectAppImageFile() {
10011001
}
10021002

10031003
private void assertAppImageFile() {
1004-
Path appImageDir = Path.of("");
1005-
if (isImagePackageType() && hasArgument("--app-image")) {
1006-
appImageDir = Path.of(getArgumentValue("--app-image"));
1007-
}
1004+
final Path lookupPath = AppImageFile.getPathInAppImage(Path.of(""));
10081005

1009-
final Path lookupPath = AppImageFile.getPathInAppImage(appImageDir);
10101006
if (!expectAppImageFile()) {
10111007
assertFileNotInAppImage(lookupPath);
10121008
} else {
@@ -1073,8 +1069,14 @@ private void assertFileInAppImage(Path filename, Path expectedPath) {
10731069
return;
10741070
}
10751071

1076-
final Path rootDir = isImagePackageType() ? outputBundle() : pathToUnpackedPackageFile(
1077-
appInstallationDirectory());
1072+
final Path rootDir;
1073+
if (TKit.isOSX() && MacHelper.signPredefinedAppImage(this)) {
1074+
rootDir = Path.of(getArgumentValue("--app-image"));
1075+
} else if (isImagePackageType()) {
1076+
rootDir = outputBundle();
1077+
} else {
1078+
rootDir = pathToUnpackedPackageFile(appInstallationDirectory());
1079+
}
10781080

10791081
try ( Stream<Path> walk = ThrowingSupplier.toSupplier(() -> {
10801082
if (TKit.isLinux() && rootDir.equals(Path.of("/"))) {

0 commit comments

Comments
 (0)