< prev index next >

test/hotspot/jtreg/runtime/appcds/TestCommon.java

Print this page

*** 147,156 **** --- 147,162 ---- // Execute JVM using AppCDS archive with specified AppCDSOptions public static OutputAnalyzer runWithArchive(AppCDSOptions opts) throws Exception { + ProcessBuilder pb = createProcessBuilderWithArchive(opts); + return executeAndLog(pb, "exec"); + } + + public static ProcessBuilder createProcessBuilderWithArchive(AppCDSOptions opts) + throws Exception { ArrayList<String> cmd = new ArrayList<String>(); for (String p : opts.prefix) cmd.add(p);
*** 166,176 **** for (String s : opts.suffix) cmd.add(s); String[] cmdLine = cmd.toArray(new String[cmd.size()]); ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, cmdLine); ! return executeAndLog(pb, "exec"); } public static OutputAnalyzer execCommon(String... suffix) throws Exception { AppCDSOptions opts = (new AppCDSOptions()); --- 172,182 ---- for (String s : opts.suffix) cmd.add(s); String[] cmdLine = cmd.toArray(new String[cmd.size()]); ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, cmdLine); ! return pb; } public static OutputAnalyzer execCommon(String... suffix) throws Exception { AppCDSOptions opts = (new AppCDSOptions());
*** 203,212 **** --- 209,224 ---- AppCDSOptions opts = (new AppCDSOptions()); opts.addSuffix(suffix).setXShareMode("auto"); return runWithArchive(opts); } + public static ProcessBuilder createProcessBuilderWithAutoArchive(String... suffix) throws Exception { + AppCDSOptions opts = (new AppCDSOptions()); + opts.addSuffix(suffix).setXShareMode("auto"); + return createProcessBuilderWithArchive(opts); + } + public static OutputAnalyzer execOff(String... suffix) throws Exception { AppCDSOptions opts = (new AppCDSOptions()); opts.addSuffix(suffix).setXShareMode("off"); return runWithArchive(opts); }
< prev index next >