changeset 24022:3cedd541a6f3

8039260: c.o.j.t.ProcessTools::createJavaProcessBuilder(boolean, String... ) must also take TestJavaOptions Reviewed-by: kvn, iignatyev Contributed-by: lev.priima@oracle.com
author iignatyev
date Thu, 17 Apr 2014 18:54:09 +0400
parents c55dabab1599
children 965f85aeb674 adf36ca51f17
files hotspot/test/testlibrary/com/oracle/java/testlibrary/ProcessTools.java
diffstat 1 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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);