7158090: (launcher) newly added ToolsOpts.java fails on openjdk builds
authorksrini
Fri, 30 Mar 2012 17:22:02 -0700
changeset 12303 498f8b38423b
parent 12302 0c8557ba0b8f
child 12305 e10f44345be4
7158090: (launcher) newly added ToolsOpts.java fails on openjdk builds Reviewed-by: darcy
jdk/test/tools/launcher/ToolsOpts.java
--- a/jdk/test/tools/launcher/ToolsOpts.java	Fri Mar 30 15:43:13 2012 -0700
+++ b/jdk/test/tools/launcher/ToolsOpts.java	Fri Mar 30 17:22:02 2012 -0700
@@ -132,9 +132,10 @@
             }
             if (pat.compareTo("-J-version") == 0 ||
                     pat.compareTo("-J-showversion") == 0) {
-                if (!tr.contains("java version")) {
+                if (!tr.contains("java version") &&
+                        !tr.contains("openjdk version")) {
                     throw new RuntimeException("failed: " + pat +
-                            " should have display java version.");
+                            " should display a version string.");
                 }
             } else if (pat.compareTo("-J-XshowSettings:VM") == 0) {
                 if (!tr.contains("VM settings")) {