< prev index next >

test/jdk/sun/tools/jhsdb/BasicLauncherTest.java

Print this page
rev 51638 : [mq]: 8210112


  23 
  24 /**
  25  * @test
  26  * @summary Basic test for jhsdb launcher
  27  * @library /test/lib
  28  * @library /lib/testlibrary
  29  * @requires vm.hasSAandCanAttach
  30  * @build jdk.testlibrary.*
  31  * @build jdk.test.lib.apps.*
  32  * @run main BasicLauncherTest
  33  */
  34 
  35 import java.io.BufferedReader;
  36 import java.io.IOException;
  37 import java.io.OutputStream;
  38 import java.io.InputStreamReader;
  39 import java.util.ArrayList;
  40 import java.util.List;
  41 import java.util.Arrays;
  42 import java.util.Optional;
  43 import jdk.testlibrary.JDKToolLauncher;
  44 import jdk.testlibrary.Utils;
  45 import jdk.testlibrary.OutputAnalyzer;
  46 import jdk.testlibrary.ProcessTools;
  47 import jdk.test.lib.apps.LingeredApp;
  48 import jdk.test.lib.Platform;


  49 
  50 public class BasicLauncherTest {
  51 
  52     private static LingeredApp theApp = null;
  53     private static boolean useJavaLauncher = false;
  54 
  55     private static JDKToolLauncher createSALauncher() {
  56         JDKToolLauncher launcher = null;
  57         if (useJavaLauncher) {
  58             // Use java launcher if we need to pass additional parameters to VM
  59             // for debugging purpose
  60             // e.g. -Xlog:class+load=info:file=/tmp/BasicLauncherTest.log
  61             launcher = JDKToolLauncher.createUsingTestJDK("java");
  62             launcher.addToolArg("sun.jvm.hotspot.SALauncher");
  63         }
  64         else {
  65             launcher = JDKToolLauncher.createUsingTestJDK("jhsdb");
  66         }
  67 
  68         return launcher;




  23 
  24 /**
  25  * @test
  26  * @summary Basic test for jhsdb launcher
  27  * @library /test/lib
  28  * @library /lib/testlibrary
  29  * @requires vm.hasSAandCanAttach
  30  * @build jdk.testlibrary.*
  31  * @build jdk.test.lib.apps.*
  32  * @run main BasicLauncherTest
  33  */
  34 
  35 import java.io.BufferedReader;
  36 import java.io.IOException;
  37 import java.io.OutputStream;
  38 import java.io.InputStreamReader;
  39 import java.util.ArrayList;
  40 import java.util.List;
  41 import java.util.Arrays;
  42 import java.util.Optional;
  43 import jdk.test.lib.process.OutputAnalyzer;
  44 import jdk.test.lib.process.ProcessTools;


  45 import jdk.test.lib.apps.LingeredApp;
  46 import jdk.test.lib.Platform;
  47 import jdk.testlibrary.JDKToolLauncher;
  48 import jdk.testlibrary.Utils;
  49 
  50 public class BasicLauncherTest {
  51 
  52     private static LingeredApp theApp = null;
  53     private static boolean useJavaLauncher = false;
  54 
  55     private static JDKToolLauncher createSALauncher() {
  56         JDKToolLauncher launcher = null;
  57         if (useJavaLauncher) {
  58             // Use java launcher if we need to pass additional parameters to VM
  59             // for debugging purpose
  60             // e.g. -Xlog:class+load=info:file=/tmp/BasicLauncherTest.log
  61             launcher = JDKToolLauncher.createUsingTestJDK("java");
  62             launcher.addToolArg("sun.jvm.hotspot.SALauncher");
  63         }
  64         else {
  65             launcher = JDKToolLauncher.createUsingTestJDK("jhsdb");
  66         }
  67 
  68         return launcher;


< prev index next >