6843648: tools/javac/versions/check.sh is broken
authorjjg
Wed, 20 May 2009 19:10:06 -0700
changeset 2983 1d164c36212a
parent 2982 090c71af18f6
child 2984 e15ff3a34054
6843648: tools/javac/versions/check.sh is broken Reviewed-by: darcy
langtools/test/tools/javac/6341866/Anno.java
langtools/test/tools/javac/6464451/BigFinally.java
langtools/test/tools/javac/6464451/DeepNestedFinally.java
langtools/test/tools/javac/6464451/ManyExitsInTry.java
langtools/test/tools/javac/ClassLit.java
langtools/test/tools/javac/T6557865.java
langtools/test/tools/javac/foreach/T6682380.java
langtools/test/tools/javac/processing/6348499/A.java
langtools/test/tools/javac/processing/6414633/A.java
langtools/test/tools/javac/processing/6430209/b6341534.java
langtools/test/tools/javac/processing/T6439826.java
langtools/test/tools/javac/stackmap/T4955930.sh
langtools/test/tools/javac/versions/check.sh
--- a/langtools/test/tools/javac/6341866/Anno.java	Wed May 20 13:36:23 2009 -0700
+++ b/langtools/test/tools/javac/6341866/Anno.java	Wed May 20 19:10:06 2009 -0700
@@ -27,7 +27,7 @@
 import javax.lang.model.element.*;
 
 @SupportedAnnotationTypes("*")
-    @SupportedSourceVersion(SourceVersion.RELEASE_6)
+    @SupportedSourceVersion(SourceVersion.RELEASE_7)
 public class Anno extends AbstractProcessor {
     public boolean process(Set<? extends TypeElement> annotations,
                                     RoundEnvironment roundEnv) {
--- a/langtools/test/tools/javac/6464451/BigFinally.java	Wed May 20 13:36:23 2009 -0700
+++ b/langtools/test/tools/javac/6464451/BigFinally.java	Wed May 20 19:10:06 2009 -0700
@@ -26,7 +26,7 @@
  * @bug     6464451
  * @summary javac in 5.0ux can not compile try-finally block which has a lot of "return"
  * @author  Wei Tao
- * @compile -target 5 BigFinally.java
+ * @compile -source 5 -target 5 BigFinally.java
  * @clean BigFinally
  * @compile/fail BigFinally.java
  */
--- a/langtools/test/tools/javac/6464451/DeepNestedFinally.java	Wed May 20 13:36:23 2009 -0700
+++ b/langtools/test/tools/javac/6464451/DeepNestedFinally.java	Wed May 20 19:10:06 2009 -0700
@@ -26,7 +26,7 @@
  * @bug     6464451
  * @summary javac in 5.0ux can not compile try-finally block which has a lot of "return"
  * @author  Wei Tao
- * @compile -target 5 DeepNestedFinally.java
+ * @compile -source 5 -target 5 DeepNestedFinally.java
  * @clean DeepNestedFinally
  * @compile/fail DeepNestedFinally.java
  */
--- a/langtools/test/tools/javac/6464451/ManyExitsInTry.java	Wed May 20 13:36:23 2009 -0700
+++ b/langtools/test/tools/javac/6464451/ManyExitsInTry.java	Wed May 20 19:10:06 2009 -0700
@@ -26,7 +26,7 @@
  * @bug     6464451
  * @summary javac in 5.0ux can not compile try-finally block which has a lot of "return"
  * @author  Wei Tao
- * @compile -target 5 ManyExitsInTry.java
+ * @compile -source 5 -target 5 ManyExitsInTry.java
  * @clean ManyExitsInTry
  * @compile/fail ManyExitsInTry.java
  */
--- a/langtools/test/tools/javac/ClassLit.java	Wed May 20 13:36:23 2009 -0700
+++ b/langtools/test/tools/javac/ClassLit.java	Wed May 20 19:10:06 2009 -0700
@@ -27,7 +27,7 @@
  * @summary Use ldc instruction for class literals
  * @author gafter
  *
- * @compile -target 1.5 ClassLit.java
+ * @compile -source 1.5 -target 1.5 ClassLit.java
  * @run main ClassLit
  */
 
--- a/langtools/test/tools/javac/T6557865.java	Wed May 20 13:36:23 2009 -0700
+++ b/langtools/test/tools/javac/T6557865.java	Wed May 20 19:10:06 2009 -0700
@@ -24,10 +24,10 @@
 /*
  * @test
  * @bug 6557865
- * @summary -target 5 should not put ACC_SYNTHETIC on package-info
+ * @summary -source 5 -target 5 should not put ACC_SYNTHETIC on package-info
  * @author Wei Tao
  * @compile T6557865.java
- * @compile -target 5 T6232928/package-info.java
+ * @compile -source 5 -target 5 T6232928/package-info.java
  * @run main T6557865
  */
 
--- a/langtools/test/tools/javac/foreach/T6682380.java	Wed May 20 13:36:23 2009 -0700
+++ b/langtools/test/tools/javac/foreach/T6682380.java	Wed May 20 19:10:06 2009 -0700
@@ -26,7 +26,7 @@
  * @bug 6682380 6679509
  * @summary Foreach loop with generics inside finally block crashes javac with -target 1.5
  * @author Jan Lahoda, Maurizio Cimadamore
- * @compile -target 1.5 T6682380.java
+ * @compile -source 1.5 -target 1.5 T6682380.java
  */
 
 import java.util.List;
--- a/langtools/test/tools/javac/processing/6348499/A.java	Wed May 20 13:36:23 2009 -0700
+++ b/langtools/test/tools/javac/processing/6348499/A.java	Wed May 20 19:10:06 2009 -0700
@@ -28,7 +28,7 @@
 import javax.lang.model.element.*;
 
 @SupportedAnnotationTypes("*")
-@SupportedSourceVersion(SourceVersion.RELEASE_6)
+@SupportedSourceVersion(SourceVersion.RELEASE_7)
 public class A extends AbstractProcessor {
     public boolean process(Set<? extends TypeElement> tes, RoundEnvironment renv) {
         Filer filer = processingEnv.getFiler();
--- a/langtools/test/tools/javac/processing/6414633/A.java	Wed May 20 13:36:23 2009 -0700
+++ b/langtools/test/tools/javac/processing/6414633/A.java	Wed May 20 19:10:06 2009 -0700
@@ -30,7 +30,7 @@
 import javax.tools.*;
 
 @SupportedAnnotationTypes("*")
-@SupportedSourceVersion(SourceVersion.RELEASE_6)
+@SupportedSourceVersion(SourceVersion.RELEASE_7)
 public class A extends AbstractProcessor {
 
     public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
--- a/langtools/test/tools/javac/processing/6430209/b6341534.java	Wed May 20 13:36:23 2009 -0700
+++ b/langtools/test/tools/javac/processing/6430209/b6341534.java	Wed May 20 19:10:06 2009 -0700
@@ -30,7 +30,7 @@
 import java.util.Set;
 
 @SupportedAnnotationTypes({"*"})
-@SupportedSourceVersion(javax.lang.model.SourceVersion.RELEASE_6)
+@SupportedSourceVersion(javax.lang.model.SourceVersion.RELEASE_7)
 public class b6341534 extends AbstractProcessor {
     static int r = 0;
     static Elements E = null;
--- a/langtools/test/tools/javac/processing/T6439826.java	Wed May 20 13:36:23 2009 -0700
+++ b/langtools/test/tools/javac/processing/T6439826.java	Wed May 20 19:10:06 2009 -0700
@@ -39,7 +39,7 @@
 
 
 @SupportedAnnotationTypes("*")
-@SupportedSourceVersion(SourceVersion.RELEASE_6 )
+@SupportedSourceVersion(SourceVersion.RELEASE_7 )
 public class T6439826 extends AbstractProcessor {
     public static void main(String... args) {
         String testSrc = System.getProperty("test.src", ".");
--- a/langtools/test/tools/javac/stackmap/T4955930.sh	Wed May 20 13:36:23 2009 -0700
+++ b/langtools/test/tools/javac/stackmap/T4955930.sh	Wed May 20 19:10:06 2009 -0700
@@ -56,7 +56,7 @@
 TMP1=T4955930.javap
 
 cp "${TESTSRC}${FS}T4955930.java" .
-"${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -target 6 T4955930.java
+"${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -source 6 -target 6 T4955930.java
 result=$?
 if [ $result -ne 0 ]
 then
--- a/langtools/test/tools/javac/versions/check.sh	Wed May 20 13:36:23 2009 -0700
+++ b/langtools/test/tools/javac/versions/check.sh	Wed May 20 19:10:06 2009 -0700
@@ -24,9 +24,8 @@
 # @test
 # @bug 4981566 5028634 5094412 6304984
 # @summary Check interpretation of -target and -source options
-#
 # @build CheckClassFileVersion
-# @run shell check.sh
+# @run shell check.sh 
 
 TESTJAVA=${TESTJAVA:?}
 TC=${TESTCLASSES-.}
@@ -48,19 +47,26 @@
   $JC ${TESTTOOLVMOPTS} -d $TC $* $TC/X.java && $CFV $TC/X.class $V || exit 2
 }
 
-check 50.0
 check 48.0 -source 1.4
+
 check 49.0 -source 1.4 -target 1.5
-check 49.0 -target 1.5
-check 50.0 -source 1.5
-check 50.0 -target 1.6
-check 50.0 -target 6
-check 50.0 -source 1.6
-check 50.0 -source 6
+check 49.0 -source 1.5 -target 1.5
+
+check 50.0 -source 1.4 -target 1.6
+check 50.0 -source 1.5 -target 1.6
+check 50.0 -source 1.6 -target 1.6
+check 50.0 -source 1.6 -target 6
+check 50.0 -source 6 -target 1.6
+check 50.0 -source 6 -target 6
+
+check 51.0
+check 51.0 -source 1.5
+check 51.0 -source 1.6
+check 51.0 -source 6
+check 51.0 -source 1.7
+check 51.0 -source 7
 check 51.0 -target 1.7
 check 51.0 -target 7
-check 51.0 -source 1.7
-check 51.0 -source 7
 
 
 # Check source versions
@@ -85,21 +91,30 @@
   fi
 }
 
+# the following need to be updated when -source 7 features are available
 checksrc14() { pass $* $TC/X.java; fail $* $TC/Y.java; }
 checksrc15() { pass $* $TC/X.java; pass $* $TC/Y.java; }
 checksrc16() { checksrc15 $* ; }
+checksrc17() { checksrc15 $* ; }
 
 checksrc14 -source 1.4
 checksrc14 -source 1.4 -target 1.5
 
-checksrc15
-checksrc15 -target 1.5
 checksrc15 -source 1.5
+checksrc15 -source 1.5 -target 1.5
 
-checksrc16 -target 1.6
-checksrc16 -target 6
 checksrc16 -source 1.6
 checksrc16 -source 6
+checksrc16 -source 1.6 -target 1.6
+checksrc16 -source 6 -target 6
+
+checksrc17
+checksrc17 -target 1.7
+checksrc17 -target 7
+checksrc17 -source 1.7
+checksrc17 -source 7
+checksrc17 -source 1.7 -target 1.7
+checksrc17 -source 7 -target 7
 
 fail -source 1.5 -target 1.4 $TC/X.java
 fail -source 1.6 -target 1.4 $TC/X.java