8169231: Fix tests to add @compile --add-modules to workaround jtreg bug

Reviewed-by: jjg
This commit is contained in:
Mandy Chung 2016-11-04 15:49:31 -07:00
parent d55905fe1b
commit 5fb366ed4f
8 changed files with 12 additions and 7 deletions

View File

@ -184,6 +184,8 @@ java/nio/file/WatchService/Basic.java 7158947 solaris-
java/nio/file/WatchService/MayFlies.java 7158947 solaris-all Solaris 11 java/nio/file/WatchService/MayFlies.java 7158947 solaris-all Solaris 11
java/nio/file/WatchService/LotsOfEvents.java 7158947 solaris-all Solaris 11 java/nio/file/WatchService/LotsOfEvents.java 7158947 solaris-all Solaris 11
sun/nio/cs/OLD/TestIBMDB.java 8167525 generic-all
############################################################################ ############################################################################
# jdk_rmi # jdk_rmi

View File

@ -26,6 +26,7 @@
* @bug 8035105 * @bug 8035105
* @summary DNS resource record parsing * @summary DNS resource record parsing
* @modules jdk.naming.dns/com.sun.jndi.dns * @modules jdk.naming.dns/com.sun.jndi.dns
* @compile --add-modules jdk.naming.dns Parser.java
*/ */
import com.sun.jndi.dns.ResourceRecord; import com.sun.jndi.dns.ResourceRecord;

View File

@ -28,7 +28,7 @@
* @modules jdk.naming.rmi/com.sun.jndi.rmi.registry java.rmi/sun.rmi.registry * @modules jdk.naming.rmi/com.sun.jndi.rmi.registry java.rmi/sun.rmi.registry
* java.rmi/sun.rmi.server java.rmi/sun.rmi.transport java.rmi/sun.rmi.transport.tcp * java.rmi/sun.rmi.server java.rmi/sun.rmi.transport java.rmi/sun.rmi.transport.tcp
* @library ../../../../../../java/rmi/testlibrary * @library ../../../../../../java/rmi/testlibrary
* @build TestLibrary * @compile --add-modules jdk.naming.rmi ContextWithNullProperties.java
* @run main ContextWithNullProperties * @run main ContextWithNullProperties
*/ */

View File

@ -24,8 +24,9 @@
/* /*
* @test * @test
* @summary Test java.* class defined by the platform class loader * @summary Test java.* class defined by the platform class loader
* @build jdk.zipfs/java.fake.Fake
* @modules jdk.zipfs/java.fake * @modules jdk.zipfs/java.fake
* @build jdk.zipfs/java.fake.Fake
* @compile --add-modules jdk.zipfs DefinePlatformClass.java
* @run main DefinePlatformClass * @run main DefinePlatformClass
*/ */

View File

@ -35,7 +35,7 @@
* @library ../pkcs11/sslecc * @library ../pkcs11/sslecc
* @library ../../../java/security/testlibrary * @library ../../../java/security/testlibrary
* @modules jdk.crypto.pkcs11/sun.security.pkcs11.wrapper * @modules jdk.crypto.pkcs11/sun.security.pkcs11.wrapper
* @compile -XDignore.symbol.file TestEC.java * @compile --add-modules jdk.crypto.pkcs11 TestEC.java
* @run main/othervm -Djdk.tls.namedGroups="secp256r1,sect193r1" TestEC * @run main/othervm -Djdk.tls.namedGroups="secp256r1,sect193r1" TestEC
* @run main/othervm/java.security.policy=TestEC.policy -Djdk.tls.namedGroups="secp256r1,sect193r1" TestEC * @run main/othervm/java.security.policy=TestEC.policy -Djdk.tls.namedGroups="secp256r1,sect193r1" TestEC
*/ */

View File

@ -26,6 +26,7 @@
* @bug 6318171 6931562 * @bug 6318171 6931562
* @requires os.family == "windows" * @requires os.family == "windows"
* @modules jdk.crypto.mscapi/sun.security.mscapi * @modules jdk.crypto.mscapi/sun.security.mscapi
* @compile --add-modules jdk.crypto.mscapi IsSunMSCAPIAvailable.java
* @run main/othervm IsSunMSCAPIAvailable * @run main/othervm IsSunMSCAPIAvailable
*/ */

View File

@ -28,7 +28,7 @@
* @author Andreas Sterbenz * @author Andreas Sterbenz
* @library .. * @library ..
* @modules jdk.crypto.pkcs11/sun.security.pkcs11.wrapper * @modules jdk.crypto.pkcs11/sun.security.pkcs11.wrapper
* @compile -XDignore.symbol.file TestCurves.java * @compile --add-modules jdk.crypto.pkcs11 TestCurves.java
* @run main/othervm TestCurves * @run main/othervm TestCurves
* @run main/othervm TestCurves sm * @run main/othervm TestCurves sm
* @key randomness * @key randomness

View File

@ -69,8 +69,6 @@ public class MiscTests extends TestHelper {
static void test6856415() throws IOException { static void test6856415() throws IOException {
final String mainClass = "Foo6856415"; final String mainClass = "Foo6856415";
final String exportOpts
= "--add-exports=jdk.crypto.pkcs11/sun.security.pkcs11=ALL-UNNAMED";
List<String> scratch = new ArrayList<>(); List<String> scratch = new ArrayList<>();
scratch.add("public class Foo6856415 {"); scratch.add("public class Foo6856415 {");
@ -81,7 +79,9 @@ public class MiscTests extends TestHelper {
scratch.add("}"); scratch.add("}");
createFile(new File(mainClass + ".java"), scratch); createFile(new File(mainClass + ".java"), scratch);
compile(mainClass + ".java", exportOpts); compile(mainClass + ".java",
"--add-modules=jdk.crypto.pkcs11",
"--add-exports=jdk.crypto.pkcs11/sun.security.pkcs11=ALL-UNNAMED");
File testJar = new File("Foo.jar"); File testJar = new File("Foo.jar");
testJar.delete(); testJar.delete();