test/jdk/com/sun/jdi/lib/jdb/JdbTest.java
changeset 54585 3452d108d06d
parent 52291 fa61165a3f2b
--- a/test/jdk/com/sun/jdi/lib/jdb/JdbTest.java	Fri Apr 19 10:59:09 2019 -0300
+++ b/test/jdk/com/sun/jdi/lib/jdb/JdbTest.java	Fri Apr 19 21:49:54 2019 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -40,6 +40,7 @@
         public final String debuggeeClass;
         public final List<String> debuggeeOptions = new LinkedList<>();
         public String sourceFilename;
+        public String vmOptions = null;
 
         public LaunchOptions(String debuggeeClass) {
             this.debuggeeClass = debuggeeClass;
@@ -56,6 +57,10 @@
             sourceFilename = name;
             return this;
         }
+        public LaunchOptions addVMOptions(String vmOptions) {
+            this.vmOptions = vmOptions;
+            return this;
+        }
     }
 
     public JdbTest(LaunchOptions launchOptions) {
@@ -72,7 +77,7 @@
 
     protected Jdb jdb;
     protected Debuggee debuggee;
-    private final LaunchOptions launchOptions;
+    protected LaunchOptions launchOptions;
 
     // returns the whole jdb output as a string
     public String getJdbOutput() {
@@ -108,6 +113,7 @@
         // launch debuggee
         debuggee = Debuggee.launcher(launchOptions.debuggeeClass)
                 .addOptions(launchOptions.debuggeeOptions)
+                .addVMOptions(launchOptions.vmOptions)
                 .launch();
 
         // launch jdb