--- old/test/hotspot/jtreg/runtime/appcds/TestCommon.java 2018-04-05 21:26:16.163539423 -0700 +++ new/test/hotspot/jtreg/runtime/appcds/TestCommon.java 2018-04-05 21:26:15.955531501 -0700 @@ -200,6 +200,12 @@ return new Result(opts, runWithArchive(opts)); } + public static Result runWithModules(String prefix[], String upgrademodulepath, String modulepath, + String mid, String... testClassArgs) throws Exception { + AppCDSOptions opts = makeModuleOptions(prefix, upgrademodulepath, modulepath, + mid, testClassArgs); + return new Result(opts, runWithArchive(opts)); + } public static OutputAnalyzer exec(String appJar, String... suffix) throws Exception { AppCDSOptions opts = (new AppCDSOptions()).setAppJar(appJar); @@ -220,10 +226,9 @@ return runWithArchive(opts); } - public static OutputAnalyzer execModule(String prefix[], String upgrademodulepath, String modulepath, - String mid, String... testClassArgs) - throws Exception { + private static AppCDSOptions makeModuleOptions(String prefix[], String upgrademodulepath, String modulepath, + String mid, String testClassArgs[]) { AppCDSOptions opts = (new AppCDSOptions()); opts.addPrefix(prefix); @@ -234,7 +239,14 @@ "-p", modulepath, "-m", mid); } opts.addSuffix(testClassArgs); + return opts; + } + public static OutputAnalyzer execModule(String prefix[], String upgrademodulepath, String modulepath, + String mid, String... testClassArgs) + throws Exception { + AppCDSOptions opts = makeModuleOptions(prefix, upgrademodulepath, modulepath, + mid, testClassArgs); return runWithArchive(opts); }