7072120: No mac os x support in several regression tests
authorkshefov
Tue, 30 Oct 2012 12:47:35 +0100
changeset 14307 2378cc5c46cc
parent 14306 8d823e84507a
child 14308 9a5191a2e798
7072120: No mac os x support in several regression tests Reviewed-by: anthony, serb
jdk/test/java/awt/Toolkit/AutoShutdown/ShowExitTest/ShowExitTest.sh
jdk/test/java/awt/appletviewer/IOExceptionIfEncodedURLTest/IOExceptionIfEncodedURLTest.sh
jdk/test/javax/imageio/stream/StreamCloserLeak/run_test.sh
--- a/jdk/test/java/awt/Toolkit/AutoShutdown/ShowExitTest/ShowExitTest.sh	Mon Oct 29 23:10:41 2012 +0400
+++ b/jdk/test/java/awt/Toolkit/AutoShutdown/ShowExitTest/ShowExitTest.sh	Tue Oct 30 12:47:35 2012 +0100
@@ -1,7 +1,7 @@
 #!/bin/ksh -p
 
 #
-# Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2007, 2012, 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
@@ -39,7 +39,7 @@
 
 #Call this from anywhere to fail the test with an error message
 # usage: fail "reason why the test failed"
-fail() 
+fail()
  { echo "The test failed :-("
    echo "$*" 1>&2
    echo "exit status was $status"
@@ -48,7 +48,7 @@
 
 #Call this from anywhere to pass the test with a message
 # usage: pass "reason why the test passed if applicable"
-pass() 
+pass()
  { echo "The test passed!!!"
    echo "$*" 1>&2
    exit 0
@@ -64,20 +64,42 @@
 case "$OS" in
    SunOS )
       VAR="One value for Sun"
-      DEFAULT_JDK=/usr/local/java/jdk1.2/solaris
+      DEFAULT_JDK=/
       FILESEP="/"
+      PATHSEP=":"
+      TMP="/tmp"
       ;;
 
    Linux )
       VAR="A different value for Linux"
-      DEFAULT_JDK=/usr/local/java/jdk1.4/linux-i386
+      DEFAULT_JDK=/
       FILESEP="/"
+      PATHSEP=":"
+      TMP="/tmp"
+      ;;
+
+   Darwin )
+      VAR="A different value for MacOSX"
+      DEFAULT_JDK=/usr
+      FILESEP="/"
+      PATHSEP=":"
+      TMP="/tmp"
       ;;
 
-   Windows_95 | Windows_98 | Windows_NT | Windows_ME )
+   Windows* )
       VAR="A different value for Win32"
-      DEFAULT_JDK=/usr/local/java/jdk1.2/win32
+      DEFAULT_JDK="C:/Program Files/Java/jdk1.8.0"
       FILESEP="\\"
+      PATHSEP=";"
+      TMP=`cd "${SystemRoot}/Temp"; echo ${PWD}`
+      ;;
+
+    CYGWIN* )
+      VAR="A different value for Cygwin"
+      DEFAULT_JDK="/cygdrive/c/Program\ Files/Java/jdk1.8.0"
+      FILESEP="/"
+      PATHSEP=";"
+      TMP=`cd "${SystemRoot}/Temp"; echo ${PWD}`
       ;;
 
    # catch all other OSs
@@ -88,8 +110,8 @@
 esac
 
 
-# Want this test to run standalone as well as in the harness, so do the 
-#  following to copy the test's directory into the harness's scratch directory 
+# Want this test to run standalone as well as in the harness, so do the
+#  following to copy the test's directory into the harness's scratch directory
 #  and set all appropriate variables:
 
 if [ -z "${TESTJAVA}" ] ; then
@@ -104,7 +126,7 @@
    if [ -n "$1" ] ;
       then TESTJAVA=$1
       else echo "no JDK specified on command line so using default!"
-	 TESTJAVA=$DEFAULT_JDK
+     TESTJAVA=$DEFAULT_JDK
    fi
    TESTSRC=.
    TESTCLASSES=.
@@ -113,25 +135,25 @@
 echo "JDK under test is: $TESTJAVA"
 
 #Deal with .class files:
-if [ -n "${STANDALONE}" ] ; 
-   then 
+if [ -n "${STANDALONE}" ] ;
+   then
    #if standalone, remind user to cd to dir. containing test before running it
    echo "Just a reminder: cd to the dir containing this test when running it"
    # then compile all .java files (if there are any) into .class files
-   if [ -a *.java ] ; 
+   if [ -a *.java ] ;
       then echo "Reminder, this test should be in its own directory with all"
       echo "supporting files it needs in the directory with it."
-      ${TESTJAVA}/bin/javac ./*.java ; 
+      ${TESTJAVA}/bin/javac ./*.java ;
    fi
    # else in harness so copy all the class files from where jtreg put them
-   # over to the scratch directory this test is running in. 
+   # over to the scratch directory this test is running in.
    else cp ${TESTCLASSES}/*.class . ;
 fi
 
-#if in test harness, then copy the entire directory that the test is in over 
+#if in test harness, then copy the entire directory that the test is in over
 # to the scratch directory.  This catches any support files needed by the test.
-if [ -z "${STANDALONE}" ] ; 
-   then cp ${TESTSRC}/* . 
+if [ -z "${STANDALONE}" ] ;
+   then cp ${TESTSRC}/* .
 fi
 
 #Just before executing anything, make sure it has executable permission!
--- a/jdk/test/java/awt/appletviewer/IOExceptionIfEncodedURLTest/IOExceptionIfEncodedURLTest.sh	Mon Oct 29 23:10:41 2012 +0400
+++ b/jdk/test/java/awt/appletviewer/IOExceptionIfEncodedURLTest/IOExceptionIfEncodedURLTest.sh	Tue Oct 30 12:47:35 2012 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2012, 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
@@ -38,7 +38,7 @@
 
 #Call this from anywhere to fail the test with an error message
 # usage: fail "reason why the test failed"
-fail() 
+fail()
  { echo "The test failed :-("
    echo "$*" 1>&2
    echo "exit status was $status"
@@ -47,7 +47,7 @@
 
 #Call this from anywhere to pass the test with a message
 # usage: pass "reason why the test passed if applicable"
-pass() 
+pass()
  { echo "The test passed!!!"
    echo "$*" 1>&2
    exit 0
@@ -99,20 +99,42 @@
 case "$OS" in
    SunOS )
       VAR="One value for Sun"
-      DEFAULT_JDK=/usr/local/java/jdk1.2.1/solaris
+      DEFAULT_JDK=/
       FILESEP="/"
+      PATHSEP=":"
+      TMP="/tmp"
       ;;
 
    Linux )
       VAR="A different value for Linux"
-      DEFAULT_JDK=/usr/local/java/jdk1.4/linux-i386
+      DEFAULT_JDK=/
       FILESEP="/"
+      PATHSEP=":"
+      TMP="/tmp"
+      ;;
+
+   Darwin )
+      VAR="A different value for MacOSX"
+      DEFAULT_JDK=/usr
+      FILESEP="/"
+      PATHSEP=":"
+      TMP="/tmp"
       ;;
 
-   Windows_95 | Windows_98 | Windows_NT | Windows_ME | CYGWIN_NT-5.1)
+   Windows* )
       VAR="A different value for Win32"
-      DEFAULT_JDK=/usr/local/java/jdk1.2.1/win32
+      DEFAULT_JDK="C:/Program Files/Java/jdk1.8.0"
       FILESEP="\\"
+      PATHSEP=";"
+      TMP=`cd "${SystemRoot}/Temp"; echo ${PWD}`
+      ;;
+
+    CYGWIN* )
+      VAR="A different value for Cygwin"
+      DEFAULT_JDK="/cygdrive/c/Program\ Files/Java/jdk1.8.0"
+      FILESEP="/"
+      PATHSEP=";"
+      TMP=`cd "${SystemRoot}/Temp"; echo ${PWD}`
       ;;
 
    # catch all other OSs
@@ -132,12 +154,12 @@
 #  note that the name of the executable is in the fail string as well.
 # this is how to check for presence of the compiler, etc.
 #RESOURCE=`whence SomeProgramOrFileNeeded`
-#if [ "${RESOURCE}" = "" ] ; 
-#   then fail "Need SomeProgramOrFileNeeded to perform the test" ; 
+#if [ "${RESOURCE}" = "" ] ;
+#   then fail "Need SomeProgramOrFileNeeded to perform the test" ;
 #fi
 
-# Want this test to run standalone as well as in the harness, so do the 
-#  following to copy the test's directory into the harness's scratch directory 
+# Want this test to run standalone as well as in the harness, so do the
+#  following to copy the test's directory into the harness's scratch directory
 #  and set all appropriate variables:
 
 if [ -z "${TESTJAVA}" ] ; then
@@ -152,7 +174,7 @@
    if [ -n "$1" ] ;
       then TESTJAVA=$1
       else echo "no JDK specified on command line so using default!"
-	 TESTJAVA=$DEFAULT_JDK
+     TESTJAVA=$DEFAULT_JDK
    fi
    TESTSRC=.
    TESTCLASSES=.
@@ -161,25 +183,25 @@
 echo "JDK under test is: $TESTJAVA"
 
 #Deal with .class files:
-if [ -n "${STANDALONE}" ] ; 
-   then 
+if [ -n "${STANDALONE}" ] ;
+   then
    #if standalone, remind user to cd to dir. containing test before running it
    echo "Just a reminder: cd to the dir containing this test when running it"
    # then compile all .java files (if there are any) into .class files
-   if [ -a *.java ] ; 
+   if [ -a *.java ] ;
       then echo "Reminder, this test should be in its own directory with all"
       echo "supporting files it needs in the directory with it."
-      ${TESTJAVA}/bin/javac ./*.java ; 
+      ${TESTJAVA}/bin/javac ./*.java ;
    fi
    # else in harness so copy all the class files from where jtreg put them
-   # over to the scratch directory this test is running in. 
+   # over to the scratch directory this test is running in.
    else cp ${TESTCLASSES}/*.class . ;
 fi
 
-#if in test harness, then copy the entire directory that the test is in over 
+#if in test harness, then copy the entire directory that the test is in over
 # to the scratch directory.  This catches any support files needed by the test.
-#if [ -z "${STANDALONE}" ] ; 
-#   then cp ${TESTSRC}/* . 
+#if [ -z "${STANDALONE}" ] ;
+#   then cp ${TESTSRC}/* .
 #fi
 
 #Just before executing anything, make sure it has executable permission!
@@ -198,7 +220,7 @@
 # this shell test as appropriate ( 0 status is considered a pass here )
 
 # The test verifies that appletviewer correctly works with the different
-# names of the files, including relative and absolute paths 
+# names of the files, including relative and absolute paths
 
 # 6619458: exclude left brace from the name of the files managed by the VCS
 NAME='test.html'
--- a/jdk/test/javax/imageio/stream/StreamCloserLeak/run_test.sh	Mon Oct 29 23:10:41 2012 +0400
+++ b/jdk/test/javax/imageio/stream/StreamCloserLeak/run_test.sh	Tue Oct 30 12:47:35 2012 +0100
@@ -1,6 +1,6 @@
 #!/bin/ksh -p
 #
-# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2012, 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
@@ -78,28 +78,44 @@
 case "$OS" in
    SunOS )
       VAR="One value for Sun"
-      DEFAULT_JDK=/usr/local/java/jdk1.2/solaris
+      DEFAULT_JDK=/
+      FILESEP="/"
+      PATHSEP=":"
+      TMP="/tmp"
+      ;;
+
+   Linux )
+      VAR="A different value for Linux"
+      DEFAULT_JDK=/
       FILESEP="/"
       PATHSEP=":"
       TMP="/tmp"
       ;;
 
-   Linux | Darwin )
-      VAR="A different value for Linux"
-      DEFAULT_JDK=/usr/local/java/jdk1.4/linux-i386
+   Darwin )
+      VAR="A different value for MacOSX"
+      DEFAULT_JDK=/usr
       FILESEP="/"
       PATHSEP=":"
       TMP="/tmp"
       ;;
 
-   Windows_95 | Windows_98 | Windows_NT | Windows_ME | CYGWIN* )
+   Windows* )
       VAR="A different value for Win32"
-      DEFAULT_JDK=/usr/local/java/jdk1.2/win32
+      DEFAULT_JDK="C:/Program Files/Java/jdk1.8.0"
       FILESEP="\\"
       PATHSEP=";"
       TMP=`cd "${SystemRoot}/Temp"; echo ${PWD}`
       ;;
 
+    CYGWIN* )
+      VAR="A different value for Cygwin"
+      DEFAULT_JDK="/cygdrive/c/Program\ Files/Java/jdk1.8.0"
+      FILESEP="/"
+      PATHSEP=";"
+      TMP=`cd "${SystemRoot}/Temp"; echo ${PWD}`
+      ;;
+
    # catch all other OSs
    * )
       echo "Unrecognized system!  $OS"