changeset 454:27753ae4c64a

meth: temporarily remove testng conversion
author jrose
date Sat, 14 Sep 2013 19:59:07 -0700
parents 383cbcabff6f
children 393962c8f84e
files meth-nsme-8001108.patch series testng-anti-diff.patch
diffstat 3 files changed, 235 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/meth-nsme-8001108.patch	Fri Sep 13 22:50:28 2013 -0700
+++ b/meth-nsme-8001108.patch	Sat Sep 14 19:59:07 2013 -0700
@@ -194,8 +194,8 @@
 --- a/test/java/lang/invoke/JavaDocExamplesTest.java
 +++ b/test/java/lang/invoke/JavaDocExamplesTest.java
 @@ -65,7 +65,11 @@
+         new JavaDocExamplesTest().run();
      }
- 
      public void run() throws Throwable {
 +        testMisc();
 +        testFindStatic();
--- a/series	Fri Sep 13 22:50:28 2013 -0700
+++ b/series	Sat Sep 14 19:59:07 2013 -0700
@@ -1,9 +1,10 @@
 # base = b67c8099ba28 in http://hg.openjdk.java.net/hsx/hotspot-comp/jdk [2013-09-12]
 
 # relevant fixes pulled from http://hg.openjdk.java.net/jdk8/tl/jdk
-tl-fixes.1.patch
-tl-fixes.2.patch
-tl-fixes.3.patch
+tl-fixes.1.patch                #-/meth #+b67c8099ba28
+tl-fixes.2.patch                #-/meth #+b67c8099ba28
+tl-fixes.3.patch                #-/meth #+b67c8099ba28
+testng-anti-diff.patch          #-/meth #+b67c8099ba28
 
 # review complete for hotspot-comp:
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/testng-anti-diff.patch	Sat Sep 14 19:59:07 2013 -0700
@@ -0,0 +1,230 @@
+Reverse patch to http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/7758bcf0ab6b
+
+diff --git a/test/java/lang/invoke/AccessControlTest.java b/test/java/lang/invoke/AccessControlTest.java
+--- b/test/java/lang/invoke/AccessControlTest.java
++++ a/test/java/lang/invoke/AccessControlTest.java
+@@ -28,7 +28,7 @@
+  * @library ../../../..
+  * @build test.java.lang.invoke.AccessControlTest
+  * @build test.java.lang.invoke.AccessControlTest_subpkg.Acquaintance_remote
+- * @run testng/othervm test.java.lang.invoke.AccessControlTest
++ * @run junit/othervm test.java.lang.invoke.AccessControlTest
+  */
+ 
+ package test.java.lang.invoke;
+@@ -36,14 +36,12 @@
+ import java.lang.invoke.*;
+ import java.lang.reflect.*;
+ import java.util.*;
+-import org.testng.*;
+-import org.testng.annotations.*;
++import org.junit.*;
+ 
+ import static java.lang.invoke.MethodHandles.*;
+ import static java.lang.invoke.MethodHandles.Lookup.*;
+ import static java.lang.invoke.MethodType.*;
+-import static org.testng.Assert.*;
+-
++import static org.junit.Assert.*;
+ import test.java.lang.invoke.AccessControlTest_subpkg.Acquaintance_remote;
+ 
+ 
+diff --git a/test/java/lang/invoke/ClassValueTest.java b/test/java/lang/invoke/ClassValueTest.java
+--- b/test/java/lang/invoke/ClassValueTest.java
++++ a/test/java/lang/invoke/ClassValueTest.java
+@@ -26,14 +26,20 @@
+ /* @test
+  * @summary tests for class-specific values
+  * @compile ClassValueTest.java
+- * @run testng/othervm test.java.lang.invoke.ClassValueTest
++ * @run junit/othervm test.java.lang.invoke.ClassValueTest
++ */
++
++/*
++  Manually:
++   $ $JAVA7X_HOME/bin/javac -d foo -cp $JUNIT4_JAR test/java/lang/invoke/ClassValueTest.java
++   $ $JAVA7X_HOME/bin/java -cp foo:$JUNIT4_JAR org.junit.runner.JUnitCore test.java.lang.invoke.ClassValueTest
++  Output: .testAdd => 1000 : Integer
+  */
+ 
+ package test.java.lang.invoke;
+ 
+-import org.testng.*;
+-import static org.testng.AssertJUnit.*;
+-import org.testng.annotations.*;
++import org.junit.*;
++import static org.junit.Assert.*;
+ 
+ /**
+  * @author jrose
+diff --git a/test/java/lang/invoke/InvokeGenericTest.java b/test/java/lang/invoke/InvokeGenericTest.java
+--- b/test/java/lang/invoke/InvokeGenericTest.java
++++ a/test/java/lang/invoke/InvokeGenericTest.java
+@@ -26,7 +26,7 @@
+ /* @test
+  * @summary unit tests for java.lang.invoke.MethodHandle.invoke
+  * @compile InvokeGenericTest.java
+- * @run testng/othervm test.java.lang.invoke.InvokeGenericTest
++ * @run junit/othervm test.java.lang.invoke.InvokeGenericTest
+  */
+ 
+ package test.java.lang.invoke;
+@@ -36,9 +36,10 @@
+ import static java.lang.invoke.MethodType.*;
+ import java.lang.reflect.*;
+ import java.util.*;
+-import org.testng.*;
+-import static org.testng.AssertJUnit.*;
+-import org.testng.annotations.*;
++import org.junit.*;
++import static org.junit.Assert.*;
++import static org.junit.Assume.*;
++
+ 
+ /**
+  *
+@@ -70,7 +71,7 @@
+     String testName;
+     static int allPosTests, allNegTests;
+     int posTests, negTests;
+-    @AfterMethod
++    @After
+     public void printCounts() {
+         if (verbosity >= 2 && (posTests | negTests) != 0) {
+             System.out.println();
+diff --git a/test/java/lang/invoke/JavaDocExamplesTest.java b/test/java/lang/invoke/JavaDocExamplesTest.java
+--- b/test/java/lang/invoke/JavaDocExamplesTest.java
++++ a/test/java/lang/invoke/JavaDocExamplesTest.java
+@@ -26,9 +26,19 @@
+ /* @test
+  * @summary example code used in javadoc for java.lang.invoke API
+  * @compile JavaDocExamplesTest.java
+- * @run testng/othervm test.java.lang.invoke.JavaDocExamplesTest
++ * @run junit/othervm test.java.lang.invoke.JavaDocExamplesTest
+  */
+ 
++/*
++---- To run outside jtreg:
++$ $JAVA7X_HOME/bin/javac -cp $JUNIT4_JAR -d /tmp/Classes \
++   $DAVINCI/sources/jdk/test/java/lang/invoke/JavaDocExamplesTest.java
++$ $JAVA7X_HOME/bin/java   -cp $JUNIT4_JAR:/tmp/Classes \
++   -DJavaDocExamplesTest.verbosity=1 \
++     test.java.lang.invoke.JavaDocExamplesTest
++----
++*/
++
+ package test.java.lang.invoke;
+ 
+ import java.lang.invoke.*;
+@@ -37,21 +47,22 @@
+ 
+ import java.util.*;
+ 
+-import org.testng.*;
+-import static org.testng.AssertJUnit.*;
+-import org.testng.annotations.*;
++import org.junit.*;
++import static org.junit.Assert.*;
++
+ 
+ /**
+  * @author jrose
+  */
+ public class JavaDocExamplesTest {
+-    /** Wrapper for running the TestNG tests in this module.
+-     *  Put TestNG on the classpath!
++    /** Wrapper for running the JUnit tests in this module.
++     *  Put JUnit on the classpath!
+      */
+     public static void main(String... ignore) throws Throwable {
++        System.out.println("can run this as:");
++        System.out.println("$ java org.junit.runner.JUnitCore "+JavaDocExamplesTest.class.getName());
+         new JavaDocExamplesTest().run();
+     }
+-
+     public void run() throws Throwable {
+         testFindVirtual();
+         testPermuteArguments();
+diff --git a/test/java/lang/invoke/MethodTypeTest.java b/test/java/lang/invoke/MethodTypeTest.java
+--- b/test/java/lang/invoke/MethodTypeTest.java
++++ a/test/java/lang/invoke/MethodTypeTest.java
+@@ -24,7 +24,7 @@
+ /* @test
+  * @summary unit tests for java.lang.invoke.MethodType
+  * @compile MethodTypeTest.java
+- * @run testng/othervm test.java.lang.invoke.MethodTypeTest
++ * @run junit/othervm test.java.lang.invoke.MethodTypeTest
+  */
+ 
+ package test.java.lang.invoke;
+@@ -34,9 +34,8 @@
+ import java.lang.reflect.Method;
+ 
+ import java.util.*;
+-import org.testng.*;
+-import static org.testng.AssertJUnit.*;
+-import org.testng.annotations.*;
++import org.junit.*;
++import static org.junit.Assert.*;
+ 
+ /**
+  *
+@@ -54,7 +53,7 @@
+     private MethodType[] GALLERY;
+     private Method compareTo;
+ 
+-    @BeforeMethod
++    @Before
+     public void setUp() throws Exception {
+         rtype = void.class;
+         ptypes = new Class<?>[] { int.class, String.class };
+@@ -95,7 +94,7 @@
+         };
+     }
+ 
+-    @AfterMethod
++    @After
+     public void tearDown() throws Exception {
+     }
+ 
+diff --git a/test/java/lang/invoke/PermuteArgsTest.java b/test/java/lang/invoke/PermuteArgsTest.java
+--- b/test/java/lang/invoke/PermuteArgsTest.java
++++ a/test/java/lang/invoke/PermuteArgsTest.java
+@@ -25,7 +25,7 @@
+ 
+ /* @test
+  * @summary unit tests for method handles which permute their arguments
+- * @run testng/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyDependencies -ea -esa -DPermuteArgsTest.MAX_ARITY=8 test.java.lang.invoke.PermuteArgsTest
++ * @run junit/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyDependencies -ea -esa -DPermuteArgsTest.MAX_ARITY=8 test.java.lang.invoke.PermuteArgsTest
+  */
+ /* Examples of manual runs:
+  * java -DPermuteArgsTest.{DRY_RUN=true,MAX_ARITY=253} test.java.lang.invoke.PermuteArgsTest
+@@ -35,8 +35,7 @@
+ 
+ package test.java.lang.invoke;
+ 
+-import org.testng.*;
+-import org.testng.annotations.*;
++import org.junit.*;
+ 
+ import java.util.*;
+ import java.lang.reflect.*;
+diff --git a/test/java/lang/invoke/ThrowExceptionsTest.java b/test/java/lang/invoke/ThrowExceptionsTest.java
+--- b/test/java/lang/invoke/ThrowExceptionsTest.java
++++ a/test/java/lang/invoke/ThrowExceptionsTest.java
+@@ -25,13 +25,12 @@
+ 
+ /* @test
+  * @summary unit tests for method handles which permute their arguments
+- * @run testng test.java.lang.invoke.ThrowExceptionsTest
++ * @run junit test.java.lang.invoke.ThrowExceptionsTest
+  */
+ 
+ package test.java.lang.invoke;
+ 
+-import org.testng.*;
+-import org.testng.annotations.*;
++import org.junit.*;
+ 
+ import java.util.*;
+ import java.lang.reflect.*;