< prev index next >

test/jdk/com/sun/jdi/cds/CDSJDITest.java

Print this page
rev 51977 : [mq]: 8211350-no-jprt


  29 import jdk.test.lib.process.ProcessTools;
  30 
  31 import java.io.*;
  32 import java.util.ArrayList;
  33 import sun.tools.jar.Main;
  34 
  35 public class CDSJDITest {
  36     private static final String classesDir = System.getProperty("test.classes");
  37 
  38     public static void runTest(String testname, String[] jarClasses) throws Exception {
  39         File jarClasslistFile = makeClassList(jarClasses);
  40         String appJar = buildJar(testname, jarClasses);
  41 
  42         // These are the arguments passed to createJavaProcessBuilder() to launch
  43         // the JDI test.
  44         String[] testArgs = {
  45         // JVM Args:
  46             // These first three properties are setup by jtreg, and must be passed
  47             // to the JDI test subprocess because it needs them in order to
  48             // pass them to the subprocess it will create for the debuggee. This
  49             // is how the JPRT -javaopts are passed to the debggee. See
  50             // VMConnection.getDebuggeeVMOptions().
  51             getPropOpt("test.classes"),
  52             getPropOpt("test.java.opts"),
  53             getPropOpt("test.vm.opts"),
  54             // Pass -showversion to the JDI test just so we get a bit of trace output.
  55             "-showversion",
  56         // Main class:
  57             testname,
  58         // Args to the Main Class:
  59             // These argument all follow the above <testname> argument, and are
  60             // in fact passed to <testname>.main() as java arguments. <testname> will
  61             // pass them as JVM arguments to the debuggee process it creates.
  62             "-Xbootclasspath/a:" + appJar,
  63             "-XX:+UnlockDiagnosticVMOptions",
  64             "-XX:+TraceClassPaths",
  65             "-XX:SharedArchiveFile=./SharedArchiveFile.jsa",
  66             "-Xshare:on",
  67             "-showversion"
  68         };
  69 




  29 import jdk.test.lib.process.ProcessTools;
  30 
  31 import java.io.*;
  32 import java.util.ArrayList;
  33 import sun.tools.jar.Main;
  34 
  35 public class CDSJDITest {
  36     private static final String classesDir = System.getProperty("test.classes");
  37 
  38     public static void runTest(String testname, String[] jarClasses) throws Exception {
  39         File jarClasslistFile = makeClassList(jarClasses);
  40         String appJar = buildJar(testname, jarClasses);
  41 
  42         // These are the arguments passed to createJavaProcessBuilder() to launch
  43         // the JDI test.
  44         String[] testArgs = {
  45         // JVM Args:
  46             // These first three properties are setup by jtreg, and must be passed
  47             // to the JDI test subprocess because it needs them in order to
  48             // pass them to the subprocess it will create for the debuggee. This
  49             // is how the -javaopts are passed to the debuggee. See
  50             // VMConnection.getDebuggeeVMOptions().
  51             getPropOpt("test.classes"),
  52             getPropOpt("test.java.opts"),
  53             getPropOpt("test.vm.opts"),
  54             // Pass -showversion to the JDI test just so we get a bit of trace output.
  55             "-showversion",
  56         // Main class:
  57             testname,
  58         // Args to the Main Class:
  59             // These argument all follow the above <testname> argument, and are
  60             // in fact passed to <testname>.main() as java arguments. <testname> will
  61             // pass them as JVM arguments to the debuggee process it creates.
  62             "-Xbootclasspath/a:" + appJar,
  63             "-XX:+UnlockDiagnosticVMOptions",
  64             "-XX:+TraceClassPaths",
  65             "-XX:SharedArchiveFile=./SharedArchiveFile.jsa",
  66             "-Xshare:on",
  67             "-showversion"
  68         };
  69 


< prev index next >