< prev index next >

test/hotspot/jtreg/runtime/appcds/sharedStrings/SharedStringsUtils.java

Print this page

*** 28,37 **** --- 28,42 ---- // A helper/utility class for testing shared strings public class SharedStringsUtils { public static final String TEST_JAR_NAME = "test"; public static final String TEST_JAR_NAME_FULL = "test.jar"; public static final String WHITEBOX_JAR_NAME = "whitebox"; + private static String vmOptionsPrefix[] = {}; + + static void setVMOptionsPrefix(String[] opts) { + vmOptionsPrefix = opts; + } public static String getWbParam() { return "-Xbootclasspath/a:" + TestCommon.getTestJar(WHITEBOX_JAR_NAME + ".jar"); }
*** 53,62 **** --- 58,68 ---- String appJar = TestCommon.getTestJar(TEST_JAR_NAME_FULL); String[] args = TestCommon.concat(extraOptions, "-XX:+UseCompressedOops", "-XX:+UseG1GC", "-XX:SharedArchiveConfigFile=" + TestCommon.getSourceFile(sharedDataFile)); + args = TestCommon.concat(vmOptionsPrefix, args); return TestCommon.dump(appJar, appClasses, args); } // execute the dump operation and check the output
*** 78,87 **** --- 84,94 ---- String... extraOptions) throws Exception { String appJar = TestCommon.getTestJar(TEST_JAR_NAME_FULL); String[] args = TestCommon.concat(extraOptions, "-cp", appJar, "-XX:+UseCompressedOops", "-XX:+UseG1GC", className); + args = TestCommon.concat(vmOptionsPrefix, args); OutputAnalyzer output = TestCommon.execAuto(args); checkExecAuto(output); return output; }
*** 96,105 **** --- 103,113 ---- String className, String... extraOptions) throws Exception { String appJar = TestCommon.getTestJar(TEST_JAR_NAME_FULL); String[] args = TestCommon.concat(extraOptions, "-XX:+UseCompressedOops", "-XX:+UseG1GC", className); + args = TestCommon.concat(vmOptionsPrefix, args); OutputAnalyzer output = TestCommon.exec(appJar, args); checkExec(output, extraMatches); return output; }
< prev index next >