8039260: c.o.j.t.ProcessTools::createJavaProcessBuilder(boolean, String... ) must also take TestJavaOptions
authoriignatyev
Thu, 17 Apr 2014 18:54:09 +0400
changeset 24022 3cedd541a6f3
parent 24021 c55dabab1599
child 24023 965f85aeb674
child 24088 adf36ca51f17
8039260: c.o.j.t.ProcessTools::createJavaProcessBuilder(boolean, String... ) must also take TestJavaOptions Reviewed-by: kvn, iignatyev Contributed-by: lev.priima@oracle.com
hotspot/test/testlibrary/com/oracle/java/testlibrary/ProcessTools.java
--- a/hotspot/test/testlibrary/com/oracle/java/testlibrary/ProcessTools.java	Wed Apr 16 14:49:03 2014 -0700
+++ b/hotspot/test/testlibrary/com/oracle/java/testlibrary/ProcessTools.java	Thu Apr 17 18:54:09 2014 +0400
@@ -145,18 +145,15 @@
     return createJavaProcessBuilder(false, command);
   }
 
-  public static ProcessBuilder createJavaProcessBuilder(boolean addTestVmOptions, String... command) throws Exception {
+  public static ProcessBuilder createJavaProcessBuilder(boolean addTestVmAndJavaOptions, String... command) throws Exception {
     String javapath = JDKToolFinder.getJDKTool("java");
 
     ArrayList<String> args = new ArrayList<>();
     args.add(javapath);
     Collections.addAll(args, getPlatformSpecificVMArgs());
 
-    if (addTestVmOptions) {
-      String vmopts = System.getProperty("test.vm.opts");
-      if (vmopts != null && vmopts.length() > 0) {
-        Collections.addAll(args, vmopts.split("\\s"));
-      }
+    if (addTestVmAndJavaOptions) {
+      Collections.addAll(args, Utils.getTestJavaOpts());
     }
 
     Collections.addAll(args, command);