当前位置: 首页>>代码示例>>Java>>正文


Java Utils.addTestJavaOpts方法代码示例

本文整理汇总了Java中jdk.testlibrary.Utils.addTestJavaOpts方法的典型用法代码示例。如果您正苦于以下问题:Java Utils.addTestJavaOpts方法的具体用法?Java Utils.addTestJavaOpts怎么用?Java Utils.addTestJavaOpts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在jdk.testlibrary.Utils的用法示例。


在下文中一共展示了Utils.addTestJavaOpts方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: startApplication

import jdk.testlibrary.Utils; //导入方法依赖的package包/类
/**
 * 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;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:23,代码来源:RunnerUtil.java

示例2: startApplication

import jdk.testlibrary.Utils; //导入方法依赖的package包/类
/**
 * 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;
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:20,代码来源:RunnerUtil.java

示例3: startApplication

import jdk.testlibrary.Utils; //导入方法依赖的package包/类
/**
 * 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", "-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;
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:20,代码来源:RunnerUtil.java

示例4: startApplication

import jdk.testlibrary.Utils; //导入方法依赖的package包/类
/**
 * 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;
}
 
开发者ID:RedlineResearch,项目名称:OLD-OpenJDK8,代码行数:20,代码来源:RunnerUtil.java


注:本文中的jdk.testlibrary.Utils.addTestJavaOpts方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。