< prev index next >

test/hotspot/jtreg/serviceability/dcmd/framework/TestProcessLauncher.java

Print this page

        

*** 24,47 **** import nsk.share.*; import nsk.share.jpda.*; import nsk.share.jdi.*; - import java.nio.file.FileSystems; - import java.nio.file.Path; - /** * Launches a new Java process that uses a communication pipe to interact * with the test. */ public class TestProcessLauncher { ! protected static final Path USER_DIR = FileSystems.getDefault().getPath(System.getProperty("user.dir", ".")); ! protected static final Path TEST_CLASSES_DIR = FileSystems.getDefault().getPath(System.getProperty("test.classes")); ! ! protected final String className; private final ArgumentHandler argHandler; private IOPipe pipe; public TestProcessLauncher(String className, ArgumentHandler argHandler) { --- 24,41 ---- import nsk.share.*; import nsk.share.jpda.*; import nsk.share.jdi.*; /** * Launches a new Java process that uses a communication pipe to interact * with the test. */ public class TestProcessLauncher { ! private final String className; private final ArgumentHandler argHandler; private IOPipe pipe; public TestProcessLauncher(String className, ArgumentHandler argHandler) {
*** 59,69 **** Log log = new Log(System.out, argHandler); Binder binder = new Binder(argHandler, log); binder.prepareForPipeConnection(argHandler); ! String cmd = prepareLaunch(java, argHandler.getPipePort()); Debugee debuggee = binder.startLocalDebugee(cmd); debuggee.redirectOutput(log); pipe = new IOPipe(debuggee); --- 53,63 ---- Log log = new Log(System.out, argHandler); Binder binder = new Binder(argHandler, log); binder.prepareForPipeConnection(argHandler); ! String cmd = java + " " + className + " -pipe.port=" + argHandler.getPipePort(); Debugee debuggee = binder.startLocalDebugee(cmd); debuggee.redirectOutput(log); pipe = new IOPipe(debuggee);
*** 79,88 **** if (pipe != null) { pipe.println("quit"); } } - protected String prepareLaunch(String javaExec, String pipePort) { - return javaExec + " " + className + " -pipe.port=" + pipePort; - } - } --- 73,78 ----
< prev index next >