Java Code Examples for jdk.testlibrary.Utils#addTestJavaOpts()

The following examples show how to use jdk.testlibrary.Utils#addTestJavaOpts() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RunnerUtil.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * The Application process must be run concurrently with our tests since
 * the tests will attach to the Application.
 * We will run the Application process in a separate thread.
 *
 * The Application must be started with flag "-Xshare:off" for the Retransform
 * test in TestBasics to pass on all platforms.
 *
 * The Application will write its pid and shutdownPort in the given outFile.
 */
public static ProcessThread startApplication(String... additionalOpts) throws Throwable {
    String classpath = System.getProperty("test.class.path", ".");
    String[] myArgs = concat(additionalOpts, new String [] {
        "-XX:+UsePerfData", "-XX:+EnableDynamicAgentLoading",
        "-Dattach.test=true", "-classpath", classpath, "Application"
    });
    String[] args = Utils.addTestJavaOpts(myArgs);
    ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args);
    ProcessThread pt = new ProcessThread("runApplication", (line) -> line.equals(Application.READY_MSG), pb);
    pt.start();
    return pt;
}
 
Example 2
Source File: RunnerUtil.java    From dragonwell8_jdk with GNU General Public License v2.0 3 votes vote down vote up
/**
 * The Application process must be run concurrently with our tests since
 * the tests will attach to the Application.
 * We will run the Application process in a separate thread.
 *
 * The Application must be started with flag "-Xshare:off" for the Retransform
 * test in TestBasics to pass on all platforms.
 *
 * The Application will write its pid and shutdownPort in the given outFile.
 */
public static ProcessThread startApplication(String outFile, String... additionalOpts) throws Throwable {
    String classpath = System.getProperty("test.class.path", ".");
    String[] myArgs = concat(additionalOpts, new String [] { "-Dattach.test=true", "-classpath", classpath, "Application", outFile });
    String[] args = Utils.addTestJavaOpts(myArgs);
    ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args);
    ProcessThread pt = new ProcessThread("runApplication", pb);
    pt.start();
    return pt;
}
 
Example 3
Source File: RunnerUtil.java    From TencentKona-8 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * The Application process must be run concurrently with our tests since
 * the tests will attach to the Application.
 * We will run the Application process in a separate thread.
 *
 * The Application must be started with flag "-Xshare:off" for the Retransform
 * test in TestBasics to pass on all platforms.
 *
 * The Application will write its pid and shutdownPort in the given outFile.
 */
public static ProcessThread startApplication(String outFile, String... additionalOpts) throws Throwable {
    String classpath = System.getProperty("test.class.path", ".");
    String[] myArgs = concat(additionalOpts, new String [] { "-Dattach.test=true", "-classpath", classpath, "Application", outFile });
    String[] args = Utils.addTestJavaOpts(myArgs);
    ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args);
    ProcessThread pt = new ProcessThread("runApplication", pb);
    pt.start();
    return pt;
}
 
Example 4
Source File: RunnerUtil.java    From jdk8u60 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * The Application process must be run concurrently with our tests since
 * the tests will attach to the Application.
 * We will run the Application process in a separate thread.
 *
 * The Application must be started with flag "-Xshare:off" for the Retransform
 * test in TestBasics to pass on all platforms.
 *
 * The Application will write its pid and shutdownPort in the given outFile.
 */
public static ProcessThread startApplication(String outFile, String... additionalOpts) throws Throwable {
    String classpath = System.getProperty("test.class.path", ".");
    String[] myArgs = concat(additionalOpts, new String [] { "-Dattach.test=true", "-classpath", classpath, "Application", outFile });
    String[] args = Utils.addTestJavaOpts(myArgs);
    ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args);
    ProcessThread pt = new ProcessThread("runApplication", pb);
    pt.start();
    return pt;
}
 
Example 5
Source File: RunnerUtil.java    From openjdk-jdk8u with GNU General Public License v2.0 3 votes vote down vote up
/**
 * The Application process must be run concurrently with our tests since
 * the tests will attach to the Application.
 * We will run the Application process in a separate thread.
 *
 * The Application must be started with flag "-Xshare:off" for the Retransform
 * test in TestBasics to pass on all platforms.
 *
 * The Application will write its pid and shutdownPort in the given outFile.
 */
public static ProcessThread startApplication(String outFile, String... additionalOpts) throws Throwable {
    String classpath = System.getProperty("test.class.path", ".");
    String[] myArgs = concat(additionalOpts, new String [] { "-Dattach.test=true", "-classpath", classpath, "Application", outFile });
    String[] args = Utils.addTestJavaOpts(myArgs);
    ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args);
    ProcessThread pt = new ProcessThread("runApplication", pb);
    pt.start();
    return pt;
}
 
Example 6
Source File: RunnerUtil.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 3 votes vote down vote up
/**
 * The Application process must be run concurrently with our tests since
 * the tests will attach to the Application.
 * We will run the Application process in a separate thread.
 *
 * The Application must be started with flag "-Xshare:off" for the Retransform
 * test in TestBasics to pass on all platforms.
 *
 * The Application will write its pid and shutdownPort in the given outFile.
 */
public static ProcessThread startApplication(String outFile, String... additionalOpts) throws Throwable {
    String classpath = System.getProperty("test.class.path", ".");
    String[] myArgs = concat(additionalOpts, new String [] { "-Dattach.test=true", "-classpath", classpath, "Application", outFile });
    String[] args = Utils.addTestJavaOpts(myArgs);
    ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args);
    ProcessThread pt = new ProcessThread("runApplication", pb);
    pt.start();
    return pt;
}
 
Example 7
Source File: RunnerUtil.java    From jdk8u-jdk with GNU General Public License v2.0 3 votes vote down vote up
/**
 * The Application process must be run concurrently with our tests since
 * the tests will attach to the Application.
 * We will run the Application process in a separate thread.
 *
 * The Application must be started with flag "-Xshare:off" for the Retransform
 * test in TestBasics to pass on all platforms.
 *
 * The Application will write its pid and shutdownPort in the given outFile.
 */
public static ProcessThread startApplication(String outFile, String... additionalOpts) throws Throwable {
    String classpath = System.getProperty("test.class.path", ".");
    String[] myArgs = concat(additionalOpts, new String [] { "-Dattach.test=true", "-classpath", classpath, "Application", outFile });
    String[] args = Utils.addTestJavaOpts(myArgs);
    ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args);
    ProcessThread pt = new ProcessThread("runApplication", pb);
    pt.start();
    return pt;
}
 
Example 8
Source File: RunnerUtil.java    From hottub with GNU General Public License v2.0 3 votes vote down vote up
/**
 * The Application process must be run concurrently with our tests since
 * the tests will attach to the Application.
 * We will run the Application process in a separate thread.
 *
 * The Application must be started with flag "-Xshare:off" for the Retransform
 * test in TestBasics to pass on all platforms.
 *
 * The Application will write its pid and shutdownPort in the given outFile.
 */
public static ProcessThread startApplication(String outFile, String... additionalOpts) throws Throwable {
    String classpath = System.getProperty("test.class.path", ".");
    String[] myArgs = concat(additionalOpts, new String [] { "-Dattach.test=true", "-classpath", classpath, "Application", outFile });
    String[] args = Utils.addTestJavaOpts(myArgs);
    ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args);
    ProcessThread pt = new ProcessThread("runApplication", pb);
    pt.start();
    return pt;
}
 
Example 9
Source File: RunnerUtil.java    From openjdk-8-source with GNU General Public License v2.0 3 votes vote down vote up
/**
 * The Application process must be run concurrently with our tests since
 * the tests will attach to the Application.
 * We will run the Application process in a separate thread.
 *
 * The Application must be started with flag "-Xshare:off" for the Retransform
 * test in TestBasics to pass on all platforms.
 *
 * The Application will write its pid and shutdownPort in the given outFile.
 */
public static ProcessThread startApplication(String outFile) throws Throwable {
    String classpath = System.getProperty("test.class.path", ".");
    String[] args = Utils.addTestJavaOpts(
        "-Dattach.test=true", "-classpath", classpath, "Application", outFile);
    ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args);
    ProcessThread pt = new ProcessThread("runApplication", pb);
    pt.start();
    return pt;
}
 
Example 10
Source File: RunnerUtil.java    From openjdk-8 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * The Application process must be run concurrently with our tests since
 * the tests will attach to the Application.
 * We will run the Application process in a separate thread.
 *
 * The Application must be started with flag "-Xshare:off" for the Retransform
 * test in TestBasics to pass on all platforms.
 *
 * The Application will write its pid and shutdownPort in the given outFile.
 */
public static ProcessThread startApplication(String outFile) throws Throwable {
    String classpath = System.getProperty("test.class.path", ".");
    String[] args = Utils.addTestJavaOpts(
        "-Dattach.test=true", "-classpath", classpath, "Application", outFile);
    ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args);
    ProcessThread pt = new ProcessThread("runApplication", pb);
    pt.start();
    return pt;
}
 
Example 11
Source File: RunnerUtil.java    From jdk8u_jdk with GNU General Public License v2.0 3 votes vote down vote up
/**
 * The Application process must be run concurrently with our tests since
 * the tests will attach to the Application.
 * We will run the Application process in a separate thread.
 *
 * The Application must be started with flag "-Xshare:off" for the Retransform
 * test in TestBasics to pass on all platforms.
 *
 * The Application will write its pid and shutdownPort in the given outFile.
 */
public static ProcessThread startApplication(String outFile, String... additionalOpts) throws Throwable {
    String classpath = System.getProperty("test.class.path", ".");
    String[] myArgs = concat(additionalOpts, new String [] { "-Dattach.test=true", "-classpath", classpath, "Application", outFile });
    String[] args = Utils.addTestJavaOpts(myArgs);
    ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args);
    ProcessThread pt = new ProcessThread("runApplication", pb);
    pt.start();
    return pt;
}
 
Example 12
Source File: RunnerUtil.java    From jdk8u-jdk with GNU General Public License v2.0 3 votes vote down vote up
/**
 * The Application process must be run concurrently with our tests since
 * the tests will attach to the Application.
 * We will run the Application process in a separate thread.
 *
 * The Application must be started with flag "-Xshare:off" for the Retransform
 * test in TestBasics to pass on all platforms.
 *
 * The Application will write its pid and shutdownPort in the given outFile.
 */
public static ProcessThread startApplication(String outFile, String... additionalOpts) throws Throwable {
    String classpath = System.getProperty("test.class.path", ".");
    String[] myArgs = concat(additionalOpts, new String [] { "-Dattach.test=true", "-classpath", classpath, "Application", outFile });
    String[] args = Utils.addTestJavaOpts(myArgs);
    ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args);
    ProcessThread pt = new ProcessThread("runApplication", pb);
    pt.start();
    return pt;
}
 
Example 13
Source File: RunnerUtil.java    From jdk8u-dev-jdk with GNU General Public License v2.0 3 votes vote down vote up
/**
 * The Application process must be run concurrently with our tests since
 * the tests will attach to the Application.
 * We will run the Application process in a separate thread.
 *
 * The Application must be started with flag "-Xshare:off" for the Retransform
 * test in TestBasics to pass on all platforms.
 *
 * The Application will write its pid and shutdownPort in the given outFile.
 */
public static ProcessThread startApplication(String outFile, String... additionalOpts) throws Throwable {
    String classpath = System.getProperty("test.class.path", ".");
    String[] myArgs = concat(additionalOpts, new String [] { "-Dattach.test=true", "-classpath", classpath, "Application", outFile });
    String[] args = Utils.addTestJavaOpts(myArgs);
    ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args);
    ProcessThread pt = new ProcessThread("runApplication", pb);
    pt.start();
    return pt;
}