44 * out.shouldContain("Full module graph = enabled");
45 * })
46 * .setProductionChecker((OutputAnalyzer out) -> {
47 * out.shouldContain("use_full_module_graph = true; java.base");
48 * })
49 * .runStaticWorkflow()
50 * .runAOTWorkflow();
51 */
52 public class SimpleCDSAppTester {
53 private String name;
54 private BiConsumer<OutputAnalyzer, RunMode> trainingChecker;
55 private BiConsumer<OutputAnalyzer, RunMode> assemblyChecker;
56 private BiConsumer<OutputAnalyzer, RunMode> productionChecker;
57 private String classpath;
58 private String modulepath;
59 private String[] appCommandLine;
60 private String[] vmArgs = new String[] {};
61 private Tester tester;
62
63 private SimpleCDSAppTester(String name) {
64 this.name = name;
65 this.tester = new Tester(name);
66 }
67
68 public static SimpleCDSAppTester of(String name) {
69 return new SimpleCDSAppTester(name);
70 }
71
72 public SimpleCDSAppTester classpath(String... paths) {
73 this.classpath = null;
74 for (String p : paths) {
75 if (this.classpath == null) {
76 this.classpath = p;
77 } else {
78 this.classpath += File.pathSeparator + p;
79 }
80 }
81 return this;
82 }
83
|
44 * out.shouldContain("Full module graph = enabled");
45 * })
46 * .setProductionChecker((OutputAnalyzer out) -> {
47 * out.shouldContain("use_full_module_graph = true; java.base");
48 * })
49 * .runStaticWorkflow()
50 * .runAOTWorkflow();
51 */
52 public class SimpleCDSAppTester {
53 private String name;
54 private BiConsumer<OutputAnalyzer, RunMode> trainingChecker;
55 private BiConsumer<OutputAnalyzer, RunMode> assemblyChecker;
56 private BiConsumer<OutputAnalyzer, RunMode> productionChecker;
57 private String classpath;
58 private String modulepath;
59 private String[] appCommandLine;
60 private String[] vmArgs = new String[] {};
61 private Tester tester;
62
63 private SimpleCDSAppTester(String name) {
64 super();
65 this.name = name;
66 this.tester = new Tester(name);
67 }
68
69 public static SimpleCDSAppTester of(String name) {
70 return new SimpleCDSAppTester(name);
71 }
72
73 public SimpleCDSAppTester classpath(String... paths) {
74 this.classpath = null;
75 for (String p : paths) {
76 if (this.classpath == null) {
77 this.classpath = p;
78 } else {
79 this.classpath += File.pathSeparator + p;
80 }
81 }
82 return this;
83 }
84
|