Skip to content

Commit 179792b

Browse files
author
Alexey Semenyuk
committedSep 29, 2023
8317283: jpackage tests run osx-specific checks on windows and linux
Reviewed-by: almatvee
1 parent bd918f4 commit 179792b

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed
 

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

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -832,6 +832,8 @@ private void assertAppImageFile() {
832832
final Path lookupPath = AppImageFile.getPathInAppImage(appImageDir);
833833
if (isRuntime() || (!isImagePackageType() && !TKit.isOSX())) {
834834
assertFileInAppImage(lookupPath, null);
835+
} else if (!TKit.isOSX()) {
836+
assertFileInAppImage(lookupPath, lookupPath);
835837
} else {
836838
assertFileInAppImage(lookupPath, lookupPath);
837839

@@ -842,15 +844,17 @@ private void assertAppImageFile() {
842844
final Path rootDir = isImagePackageType() ? outputBundle() :
843845
pathToUnpackedPackageFile(appInstallationDirectory());
844846

847+
AppImageFile aif = AppImageFile.load(rootDir);
848+
845849
boolean expectedValue = hasArgument("--mac-sign");
846-
boolean actualValue = AppImageFile.load(rootDir).isSigned();
847-
TKit.assertTrue(expectedValue == actualValue,
848-
"Unexptected value in app image file for <signed>");
850+
boolean actualValue = aif.isSigned();
851+
TKit.assertEquals(Boolean.toString(expectedValue), Boolean.toString(actualValue),
852+
"Check for unexptected value in app image file for <signed>");
849853

850854
expectedValue = hasArgument("--mac-app-store");
851-
actualValue = AppImageFile.load(rootDir).isAppStore();
852-
TKit.assertTrue(expectedValue == actualValue,
853-
"Unexptected value in app image file for <app-store>");
855+
actualValue = aif.isAppStore();
856+
TKit.assertEquals(Boolean.toString(expectedValue), Boolean.toString(actualValue),
857+
"Check for unexptected value in app image file for <app-store>");
854858
}
855859
}
856860
}

0 commit comments

Comments
 (0)
Please sign in to comment.