changeset 156:7906b5ebfc75

Add support for jdk.version.major for use in @requires Contributed-by: jvanek@redhat.com
author jjg
date Thu, 16 Apr 2015 17:45:57 -0700
parents e88738b571de
children 0aeb6c650944
files src/share/classes/com/sun/javatest/regtest/RegressionContext.java src/share/classes/com/sun/javatest/regtest/agent/JDK_Version.java src/share/doc/javatest/regtest/tag-spec.html
diffstat 3 files changed, 24 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/javatest/regtest/RegressionContext.java	Mon Mar 30 17:56:11 2015 -0700
+++ b/src/share/classes/com/sun/javatest/regtest/RegressionContext.java	Thu Apr 16 17:45:57 2015 -0700
@@ -53,6 +53,7 @@
         JDK jdk = (params == null) ? null : params.getTestJDK();
         JDK_Version jdkVersion = (jdk == null) ? null : jdk.getVersion(params);
         values.put("jdk.version", jdkVersion != null ? jdkVersion.name : "unknown");
+        values.put("jdk.version.major", jdkVersion != null ? jdkVersion.major : "0");
         // profile... (JDK 8)
         // modules... (JDK 9)
 
--- a/src/share/classes/com/sun/javatest/regtest/agent/JDK_Version.java	Mon Mar 30 17:56:11 2015 -0700
+++ b/src/share/classes/com/sun/javatest/regtest/agent/JDK_Version.java	Thu Apr 16 17:45:57 2015 -0700
@@ -47,7 +47,7 @@
     }
 
     public final String name;
-    private final String major;
+    public final String major;
 
     public static JDK_Version forName(String name) {
         // for now, always allow/ignore optional leading 1.
--- a/src/share/doc/javatest/regtest/tag-spec.html	Mon Mar 30 17:56:11 2015 -0700
+++ b/src/share/doc/javatest/regtest/tag-spec.html	Thu Apr 16 17:45:57 2015 -0700
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
 <!--
- Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 
  This code is free software; you can redistribute it and/or modify it
@@ -51,7 +51,7 @@
 <p>Comments and questions to:
 <a href="mailto:jtreg-use@openjdk.java.net">jtreg-use@openjdk.java.net</a>.
 <br>
-1.36 (draft), 20 November, 2014
+1.37 (draft), 16 April, 2015
 </div>
 
 <p>This is a specification document, not a tutorial.  For more basic information
@@ -887,74 +887,80 @@
     <td>
     <td>
 
-<tr class="even"><td><code>os.name</code>
+<tr class="even"><td><code>jdk.version.major</code>
+    <td>The major component of the version string, i.e. ignoring any leading "1."
+	for versions prior to JDK 9.
+    <td>
+    <td>
+
+<tr class="odd"><td><code>os.name</code>
     <td>The operating system name, as given by the corresponding system property.
     <td>
     <td>
 
-<tr class="odd"><td><code>os.family</code>
+<tr class="even"><td><code>os.family</code>
     <td>The operation system family, derived from the operating sytsem name.
     <td>One of <code>linux</code> <code>mac</code> <code>solaris</code> <code>windows</code>
     <td>first word of <code>os.name</code>	
 
-<tr class="even"><td><code>os.arch</code>
+<tr class="odd"><td><code>os.arch</code>
     <td>The operating system architecture, as given by the corresponding system property.
     <td>
     <td>
 
-<tr class="odd"><td><code>os.simpleArch</code>
+<tr class="even"><td><code>os.simpleArch</code>
     <td>A simplified representation of the operating system architecture.
     <td>One of <code>x64</code> <code>i586</code> <code>ppc</code>
     <td>same as <code>os.arch</code>
 
-<tr class="even"><td><code>os.version</code>
+<tr class="odd"><td><code>os.version</code>
     <td>The operating system version, as given by the corresponding system property.
     <td>
     <td>
 
-<tr class="odd"><td><code>os.simpleVersion</code>
+<tr class="even"><td><code>os.simpleVersion</code>
     <td>A simplified representation of the operating system version.
     <td><code><i>N</i>.0</code> or <code><i>N</i>.<i>M</i></code>,
         where <code><i>N</i></code> and <code><i>M</i></code>
         are first two numbers in <code>os.version</code>
     <td><code>99.99</code>
 
-<tr class="even"><td><code>vm.flavor</code>
+<tr class="odd"><td><code>vm.flavor</code>
     <td>The kind of VM, derived from the options <code>-client</code> <code>-server</code>
     <td>One of <code>client</code> <code>server</code>
     <td>
 
-<tr><td><code>vm.bits</code>
+<tr class="even"><td><code>vm.bits</code>
     <td>The kind of VM, derived from the options <code>-d32</code> <code>-d64</code>
     <td>One of <code>d32</code> <code>d64</code>
     <td>
 
-<tr class="even"><td><code>vm.gc</code>
+<tr class="odd"><td><code>vm.gc</code>
     <td>The garbage collection strategy, derived from the option <code>-XX:+Use<i>name</i>GC</code>
     <td><code><i>name</i></code>
     <td>
 
-<tr class="odd"><td><code>vm.compMode</code>
+<tr class="even"><td><code>vm.compMode</code>
     <td>The VM compilation mode, derived from the options <code>-Xcomp</code> <code>-Xint</code> <code>-Xmixed</code>
     <td>One of <code>Xcomp</code> <code>Xint</code> <code>Xmixed</code>
     <td>
 
-<tr class="even"><td><code>vm.opt.<i>switch</i></code>
+<tr class="odd"><td><code>vm.opt.<i>switch</i></code>
     <td>A boolean VM option, derived from option <code>-XX:+<i>switch</i></code> or <code>-XX:-<i>switch</i></code>
     <td><code>true</code> <code>false</code>
     <td>
 
-<tr class="odd"><td><code>vm.opt.<i>name</i></code>
+<tr class="even"><td><code>vm.opt.<i>name</i></code>
     <td>A VM option, derived from option <code>-XX:<i>name</i>=<i>value</i></code>
     <td><code><i>value</i></code>
     <td>
 	
-<tr class="even" style="color:gray"><td><code>profile</code>
+<tr class="odd" style="color:gray"><td><code>profile</code>
     <td>The name of the highest profile supported by the test JDK.
     <td>One of <code>compact1</code> <code>compact2</code> <code>compact3</code>
     <td>
 
-<tr class="odd" style="color:gray"><td><code>module:<i>name</i></code>
+<tr class="even" style="color:gray"><td><code>module:<i>name</i></code>
     <td>Whether or not a module is available in the test JDK.
     <td>One of <code>true</code> <code>false</code>
     <td>