Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Update jdk.test.lib.Platform to work with J9 #5

Merged
merged 1 commit into from
Jan 14, 2022
Merged
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
13 changes: 7 additions & 6 deletions test/lib/jdk/test/lib/Platform.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,16 @@ private static String privilegedGetProperty(String key) {
PrivilegedAction<String>) () -> System.getProperty(key));
}

private static boolean isJ9() {
return vmName.contains("OpenJ9") || vmName.contains("IBM");
}

public static boolean isClient() {
return vmName.endsWith(" Client VM");
}

public static boolean isServer() {
return vmName.endsWith(" Server VM");
return isJ9() || vmName.endsWith(" Server VM");
}

public static boolean isZero() {
Expand Down Expand Up @@ -364,10 +368,7 @@ public static Path jvmLibDir() {
}

private static String variant() {
if (Platform.isServer()
|| vmName.toLowerCase().contains("openj9")
|| vmName.toLowerCase().contains("ibm")
) {
if (Platform.isServer()) {
return "server";
} else if (Platform.isClient()) {
return "client";
Expand All @@ -383,7 +384,7 @@ private static String variant() {

public static boolean isDefaultCDSArchiveSupported() {
return (is64bit() &&
isServer() &&
isServer() && !isJ9() &&
(isLinux() ||
isOSX() ||
isWindows()) &&
Expand Down