changeset 11231:5aec1b06349c

8067291: Need additional vm checks in jdk/test/lib/testlibrary/jdk/testlibrary/Platform, checking which vm is run Reviewed-by: fzhinkin, iignatyev
author dpochepk
date Fri, 12 Dec 2014 00:40:56 +0300
parents 6249ced5ff69
children 2b0c2588b324
files test/lib/testlibrary/jdk/testlibrary/Platform.java
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/test/lib/testlibrary/jdk/testlibrary/Platform.java	Wed Dec 24 17:54:00 2014 +0300
+++ b/test/lib/testlibrary/jdk/testlibrary/Platform.java	Fri Dec 12 00:40:56 2014 +0300
@@ -28,6 +28,15 @@
     private static final String dataModel   = System.getProperty("sun.arch.data.model");
     private static final String vmVersion   = System.getProperty("java.vm.version");
     private static final String osArch      = System.getProperty("os.arch");
+    private static final String vmName      = System.getProperty("java.vm.name");
+
+    public static boolean isClient() {
+        return vmName.endsWith(" Client VM");
+    }
+
+    public static boolean isServer() {
+        return vmName.endsWith(" Server VM");
+    }
 
     public static boolean is32bit() {
         return dataModel.equals("32");