changeset 9285:03c3b2bc12dd

8028711: TEST_BUG: Shell tests should pass through VM options Reviewed-by: alanb Contributed-by: michael.cui@oracle.com
author alanb
date Thu, 13 Feb 2014 15:59:04 +0000
parents ef67125ce0c2
children 88fb01f57ffa
files test/com/sun/corba/5036554/TestCorbaBug.sh test/java/awt/FontClass/CreateFont/DeleteFont.sh test/java/awt/JAWT/JAWT.sh test/java/awt/PrintJob/Text/stringwidth.sh test/java/awt/Toolkit/AutoShutdown/ShowExitTest/ShowExitTest.sh test/java/awt/Toolkit/BadDisplayTest/BadDisplayTest.sh test/java/awt/Toolkit/Headless/WrappedToolkitTest/WrappedToolkitTest.sh test/java/net/URLPermission/nstest/lookup.sh test/java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh test/javax/imageio/metadata/IIOMetadataFormat/runMetadataFormatTest.sh test/javax/imageio/metadata/IIOMetadataFormat/runMetadataFormatThreadTest.sh test/javax/imageio/stream/StreamCloserLeak/run_test.sh test/javax/print/PrintSE/PrintSE.sh test/sun/java2d/X11SurfaceData/SharedMemoryPixmapsTest/SharedMemoryPixmapsTest.sh test/sun/security/krb5/config/dns.sh test/sun/security/tools/keytool/autotest.sh test/sun/tools/jconsole/ResourceCheckTest.sh test/sun/tools/native2ascii/resources/ImmutableResourceTest.sh
diffstat 18 files changed, 35 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/test/com/sun/corba/5036554/TestCorbaBug.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/test/com/sun/corba/5036554/TestCorbaBug.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -83,7 +83,7 @@
 
 ${TESTJAVA}${FS}bin${FS}javac -d . bug${FS}*.java
 
-${TESTJAVA}${FS}bin${FS}java -cp . bug/JavaBug > test.out 2>&1 
+${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -cp . bug/JavaBug > test.out 2>&1 
 
 grep "NullPointerException" test.out
 
--- a/test/java/awt/FontClass/CreateFont/DeleteFont.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/test/java/awt/FontClass/CreateFont/DeleteFont.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -47,7 +47,7 @@
 cd ${TESTCLASSES}
 
 numfiles0=`ls ${TESTCLASSES} | wc -l`
-${TESTJAVA}/bin/java -Djava.io.tmpdir=${TESTCLASSES} DeleteFont
+${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.io.tmpdir=${TESTCLASSES} DeleteFont
 
 if [ $? -ne 0 ]
     then
--- a/test/java/awt/JAWT/JAWT.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/test/java/awt/JAWT/JAWT.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -165,7 +165,7 @@
 ${JAVAC} -d . ${TESTSRC}${FS}MyCanvas.java
 ${JAVAH} -jni -classpath . -d . MyCanvas
 ${MAKE} -f ${MAKEFILE}
-${JAVA} -classpath . MyCanvas
+${JAVA} ${TESTVMOPTS} -classpath . MyCanvas
 
 exit $?
 
--- a/test/java/awt/PrintJob/Text/stringwidth.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/test/java/awt/PrintJob/Text/stringwidth.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -58,7 +58,7 @@
    JAVA_HOME=$TESTJAVA
 fi
 
-    $JAVA_HOME/bin/java -cp "${CP}" StringWidth
+    $JAVA_HOME/bin/java ${TESTVMOPTS} -cp "${CP}" StringWidth
     checkstatus
 
 exit 0
--- a/test/java/awt/Toolkit/AutoShutdown/ShowExitTest/ShowExitTest.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/test/java/awt/Toolkit/AutoShutdown/ShowExitTest/ShowExitTest.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -175,7 +175,7 @@
 # pass, you should be able to cut and paste it into here and it will
 # run with the test harness.
 
-${TESTJAVA}/bin/java ShowExitTest
+${TESTJAVA}/bin/java ${TESTVMOPTS} ShowExitTest
 
 ###############  END YOUR TEST CODE !!!!! ############
 #Be sure the last command executed above this line returns 0 for success,
--- a/test/java/awt/Toolkit/BadDisplayTest/BadDisplayTest.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/test/java/awt/Toolkit/BadDisplayTest/BadDisplayTest.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -28,10 +28,10 @@
 OS=`uname -s`
 case "$OS" in
   SunOS )
-    ${TESTJAVA}/bin/java BadDisplayTest
+    ${TESTJAVA}/bin/java ${TESTVMOPTS} BadDisplayTest
     ;;
   Linux )
-    ${TESTJAVA}/bin/java BadDisplayTest
+    ${TESTJAVA}/bin/java ${TESTVMOPTS} BadDisplayTest
      ;;
   * )
     echo "Unsupported System: ${OS}"
--- a/test/java/awt/Toolkit/Headless/WrappedToolkitTest/WrappedToolkitTest.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/test/java/awt/Toolkit/Headless/WrappedToolkitTest/WrappedToolkitTest.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -146,13 +146,13 @@
 
 case "$OS" in
   Windows* | CYGWIN* )
-    ${TESTJAVA}/bin/java -Djava.awt.headless=true \
+    ${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \
                          TestWrapped sun.awt.windows.WToolkit
     status=$?
     if [ ! $status -eq "0" ]; then
       fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.awt.windows.WToolkit";
     fi
-    ${TESTJAVA}/bin/java -Djava.awt.headless=true \
+    ${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \
                          -Dawt.toolkit=sun.awt.windows.WToolkit \
                          TestWrapped sun.awt.windows.WToolkit
     status=$?
@@ -162,14 +162,15 @@
     ;;
 
   SunOS | Linux )
-    ${TESTJAVA}/bin/java -Djava.awt.headless=true \
+    ${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \
                          -Dawt.toolkit=sun.awt.X11.XToolkit \
                          TestWrapped sun.awt.X11.XToolkit
     status=$?
     if [ ! $status -eq "0" ]; then
       fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.awt.xawt.XToolkit";
     fi
-    AWT_TOOLKIT=XToolkit ${TESTJAVA}/bin/java -Djava.awt.headless=true \
+    AWT_TOOLKIT=XToolkit ${TESTJAVA}/bin/java ${TESTVMOPTS} \
+                                              -Djava.awt.headless=true \
                                               TestWrapped sun.awt.X11.XToolkit
     status=$?
     if [ ! $status -eq "0" ]; then
@@ -178,13 +179,13 @@
     ;;
 
   Darwin)
-    ${TESTJAVA}/bin/java -Djava.awt.headless=true \
+    ${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \
                          TestWrapped sun.lwawt.macosx.LWCToolkit
     status=$?
     if [ ! $status -eq "0" ]; then
       fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.lwawt.macosx.LWCToolkit";
     fi
-    ${TESTJAVA}/bin/java -Djava.awt.headless=true \
+    ${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \
                          -Dawt.toolkit=sun.lwawt.macosx.LWCToolkit \
                          TestWrapped sun.lwawt.macosx.LWCToolkit
     status=$?
--- a/test/java/net/URLPermission/nstest/lookup.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/test/java/net/URLPermission/nstest/lookup.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -56,4 +56,7 @@
 };
 POLICY
 
-${TESTJAVA}/bin/java -Djava.security.policy=file:./policy -Dsun.net.spi.nameservice.provider.1=simple,sun -cp ${TESTCLASSES}${PS}${TESTSRC} LookupTest -runtest ${port}
+${TESTJAVA}/bin/java ${TESTVMOPTS} \
+    -Djava.security.policy=file:./policy \
+    -Dsun.net.spi.nameservice.provider.1=simple,sun \
+    -cp ${TESTCLASSES}${PS}${TESTSRC} LookupTest -runtest ${port}
--- a/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -109,7 +109,7 @@
 
 go() {
     echo ''
-    sh -xc "$JAVA $DFLAG $1 $2 $3 $4 $5 $6 $7 $8" 2>&1
+    sh -xc "$JAVA ${TESTVMOPTS} $DFLAG $1 $2 $3 $4 $5 $6 $7 $8" 2>&1
     if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
 }
 
--- a/test/javax/imageio/metadata/IIOMetadataFormat/runMetadataFormatTest.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/test/javax/imageio/metadata/IIOMetadataFormat/runMetadataFormatTest.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -211,7 +211,8 @@
 # split application classes and test plugin classes
 mv ./UserPluginMetadataFormatTest*.class ./test_classes
 
-$TESTJAVA/bin/java MetadataFormatTest test_classes UserPluginMetadataFormatTest
+$TESTJAVA/bin/java ${TESTVMOPTS} \
+    MetadataFormatTest test_classes UserPluginMetadataFormatTest
 
 ###############  END YOUR TEST CODE !!!!! ############
 status=$?
--- a/test/javax/imageio/metadata/IIOMetadataFormat/runMetadataFormatThreadTest.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/test/javax/imageio/metadata/IIOMetadataFormat/runMetadataFormatThreadTest.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -212,7 +212,8 @@
 # split application classes and test plugin classes
 mv ./UserPluginMetadataFormatTest*.class ./test_classes
 
-$TESTJAVA/bin/java MetadataFormatThreadTest test_classes UserPluginMetadataFormatTest
+$TESTJAVA/bin/java ${TESTVMOPTS} \
+    MetadataFormatThreadTest test_classes UserPluginMetadataFormatTest
 
 ###############  END YOUR TEST CODE !!!!! ############
 status=$?
--- a/test/javax/imageio/stream/StreamCloserLeak/run_test.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/test/javax/imageio/stream/StreamCloserLeak/run_test.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -198,14 +198,15 @@
 fi
 
 # Verify that all classoladers are destroyed
-${TESTJAVA}/bin/java -cp Test.jar test.Main
+${TESTJAVA}/bin/java ${TESTVMOPTS} -cp Test.jar test.Main
 if [ $? -ne 0 ] ; then
     fail "Test FAILED: some classloaders weren't destroyed."
 fi
 
 
 # Verify that ImageIO shutdown hook works correcly
-${TESTJAVA}/bin/java -cp Test.jar -DforgetSomeStreams=true test.Main
+${TESTJAVA}/bin/java ${TESTVMOPTS} \
+    -cp Test.jar -DforgetSomeStreams=true test.Main
 if [ $? -ne 0 ] ; then
     fail "Test FAILED: some classloaders weren't destroyed of shutdown hook failed."
 fi
--- a/test/javax/print/PrintSE/PrintSE.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/test/javax/print/PrintSE/PrintSE.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -46,6 +46,9 @@
 
 createJavaPolicyFile
 
-${TESTJAVA}/bin/java -Djava.security.manager -Djava.security.policy=${TESTCLASSES}/print.policy -cp ${TESTCLASSES} PrintSE
+${TESTJAVA}/bin/java ${TESTVMOPTS} \
+    -Djava.security.manager \
+    -Djava.security.policy=${TESTCLASSES}/print.policy \
+    -cp ${TESTCLASSES} PrintSE
 
 exit $?
--- a/test/sun/java2d/X11SurfaceData/SharedMemoryPixmapsTest/SharedMemoryPixmapsTest.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/test/sun/java2d/X11SurfaceData/SharedMemoryPixmapsTest/SharedMemoryPixmapsTest.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -41,7 +41,7 @@
 J2D_PIXMAPS=shared
 export NO_J2D_DGA J2D_PIXMAPS
 
-${TESTJAVA}/bin/java SharedMemoryPixmapsTest
+${TESTJAVA}/bin/java ${TESTVMOPTS} SharedMemoryPixmapsTest
 
 if [ $? -ne 0 ]; then
   echo "Test failed!"
--- a/test/sun/security/krb5/config/dns.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/test/sun/security/krb5/config/dns.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -40,5 +40,5 @@
 
 $COMPILEJAVA/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . \
    ${TESTSRC}/NamingManager.java ${TESTSRC}/DNS.java
-$TESTJAVA/bin/java -Xbootclasspath/p:. DNS
+$TESTJAVA/bin/java ${TESTVMOPTS} -Xbootclasspath/p:. DNS
 
--- a/test/sun/security/tools/keytool/autotest.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/test/sun/security/tools/keytool/autotest.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -106,7 +106,7 @@
 chmod u+w key3.db
 chmod u+w cert8.db
 
-echo | ${TESTJAVA}${FS}bin${FS}java -Dnss \
+echo | ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Dnss \
    -Dnss.lib=${LIBNAME} \
    KeyToolTest
 status=$?
--- a/test/sun/tools/jconsole/ResourceCheckTest.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/test/sun/tools/jconsole/ResourceCheckTest.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -102,7 +102,7 @@
                          "${TESTSRC}"/"${TARGETCLASS}".java
 #
 #Run the test class, again with the classpath we need:
-${TESTJAVA}/bin/java ${CP} ${TARGETCLASS}
+${TESTJAVA}/bin/java ${TESTVMOPTS} ${CP} ${TARGETCLASS}
 status=$?
 echo "test status was: $status"
 if [ $status -eq "0" ];
--- a/test/sun/tools/native2ascii/resources/ImmutableResourceTest.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/test/sun/tools/native2ascii/resources/ImmutableResourceTest.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -104,7 +104,7 @@
                          "${TESTSRC}"/"${TARGETCLASS}".java
 #
 #Run the test class, again with the classpath we need:
-${TESTJAVA}/bin/java ${CP} ${TARGETCLASS}
+${TESTJAVA}/bin/java ${TESTVMOPTS} ${CP} ${TARGETCLASS}
 status=$?
 echo "test status was: $status"
 if [ $status -eq "0" ];