66 System.err.println("Test not run");
67 return;
68 }
69
70 var module = "vendorinfo";
71 helper.generateDefaultJModule(module);
72 var image = helper.generateDefaultImage(new String[] {
73 "--add-modules", "jdk.unsupported",
74 "--vendor-version", VERSION,
75 "--vendor-bug-url", BUG_URL,
76 "--vendor-vm-bug-url", VM_BUG_URL },
77 module).assertSuccess();
78 helper.checkImage(image, module, null, null);
79
80 // Properties and --version
81 var launcher
82 = image.resolve("bin/java"
83 + (System.getProperty("os.name").startsWith("Windows")
84 ? ".exe" : "")).toString();
85 var oa = ProcessTools.executeProcess(launcher,
86 "-XshowSettings:properties",
87 "--version");
88 oa.stderrShouldMatch("^ +java.vendor.url.bug = " + BUG_URL + "$");
89 oa.stderrShouldMatch("^ +java.vendor.version = " + VERSION + "$");
90 oa.stdoutShouldMatch("^.*Runtime Environment " + VERSION + " \\(.*build.*$");
91 oa.stdoutShouldMatch("^.*VM " + VERSION + " \\(.*build.*$");
92
93 // VM error log
94 oa = ProcessTools.executeProcess(launcher,
95 "--class-path",
96 System.getProperty("test.classes"),
97 "VendorInfoPluginsTest$Crasher");
98 oa.stdoutShouldMatch("^# +" + VM_BUG_URL + "$");
99 oa.stdoutShouldMatch("^.*Runtime Environment " + VERSION + " \\(.*$");
100 oa.stdoutShouldMatch("^.*VM " + VERSION + " \\(.*$");
101
102 }
103
104 }
|
66 System.err.println("Test not run");
67 return;
68 }
69
70 var module = "vendorinfo";
71 helper.generateDefaultJModule(module);
72 var image = helper.generateDefaultImage(new String[] {
73 "--add-modules", "jdk.unsupported",
74 "--vendor-version", VERSION,
75 "--vendor-bug-url", BUG_URL,
76 "--vendor-vm-bug-url", VM_BUG_URL },
77 module).assertSuccess();
78 helper.checkImage(image, module, null, null);
79
80 // Properties and --version
81 var launcher
82 = image.resolve("bin/java"
83 + (System.getProperty("os.name").startsWith("Windows")
84 ? ".exe" : "")).toString();
85 var oa = ProcessTools.executeProcess(launcher,
86 "-Xmx64m",
87 "-XshowSettings:properties",
88 "--version");
89 oa.stderrShouldMatch("^ +java.vendor.url.bug = " + BUG_URL + "$");
90 oa.stderrShouldMatch("^ +java.vendor.version = " + VERSION + "$");
91 oa.stdoutShouldMatch("^.*Runtime Environment " + VERSION + " \\(.*build.*$");
92 oa.stdoutShouldMatch("^.*VM " + VERSION + " \\(.*build.*$");
93
94 // VM error log
95 oa = ProcessTools.executeProcess(launcher,
96 "-Xmx64m",
97 "-XX:-CreateCoredumpOnCrash",
98 "--class-path",
99 System.getProperty("test.classes"),
100 "VendorInfoPluginsTest$Crasher");
101 oa.stdoutShouldMatch("^# +" + VM_BUG_URL + "$");
102 oa.stdoutShouldMatch("^.*Runtime Environment " + VERSION + " \\(.*$");
103 oa.stdoutShouldMatch("^.*VM " + VERSION + " \\(.*$");
104
105 }
106
107 }
|