Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions test/jdk/tools/jpackage/helpers/jdk/jpackage/test/TKit.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,14 @@
import java.util.function.Supplier;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import jdk.internal.util.OperatingSystem;
import jdk.jpackage.test.Functional.ExceptionBox;
import jdk.jpackage.test.Functional.ThrowingConsumer;
import jdk.jpackage.test.Functional.ThrowingRunnable;
import jdk.jpackage.test.Functional.ThrowingSupplier;

final public class TKit {

private static final String OS = System.getProperty("os.name").toLowerCase();

public static final Path TEST_SRC_ROOT = Functional.identity(() -> {
Path root = Path.of(System.getProperty("test.src"));

Expand Down Expand Up @@ -171,15 +170,15 @@ static String getCurrentDefaultAppName() {
}

public static boolean isWindows() {
return (OS.contains("win"));
return OperatingSystem.isWindows();
}

public static boolean isOSX() {
return (OS.contains("mac"));
return OperatingSystem.isMacOS();
}

public static boolean isLinux() {
return ((OS.contains("nix") || OS.contains("nux")));
return OperatingSystem.isLinux();
}

public static boolean isLinuxAPT() {
Expand Down
3 changes: 2 additions & 1 deletion test/jdk/tools/jpackage/macosx/HostArchPkgTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathFactory;
import jdk.internal.util.Architecture;
import jdk.jpackage.test.JPackageCommand;
import jdk.jpackage.test.PackageTest;
import jdk.jpackage.test.PackageType;
Expand Down Expand Up @@ -73,7 +74,7 @@ private static void verifyHostArch(JPackageCommand cmd) throws Exception {
"/installer-gui-script/options/@hostArchitectures",
doc, XPathConstants.STRING);

if ("aarch64".equals(System.getProperty("os.arch"))) {
if (Architecture.isAARCH64()) {
TKit.assertEquals(v, "arm64",
"Check value of \"hostArchitectures\" attribute");
} else {
Expand Down