annotate test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh @ 3261:a06412e13bf7

6962318: Update copyright year Reviewed-by: xdono
author ohair
date Tue, 28 Dec 2010 15:53:50 -0800
parents 00cd9dc3c2b5
children d45bc4307996
rev   line source
duke@0 1 #
ohair@3261 2 # Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
duke@0 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@0 4 #
duke@0 5 # This code is free software; you can redistribute it and/or modify it
duke@0 6 # under the terms of the GNU General Public License version 2 only, as
duke@0 7 # published by the Free Software Foundation.
duke@0 8 #
duke@0 9 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@0 10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0 11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@0 12 # version 2 for more details (a copy is included in the LICENSE file that
duke@0 13 # accompanied this code).
duke@0 14 #
duke@0 15 # You should have received a copy of the GNU General Public License version
duke@0 16 # 2 along with this work; if not, write to the Free Software Foundation,
duke@0 17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0 18 #
ohair@2362 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@2362 20 # or visit www.oracle.com if you need additional information or have any
ohair@2362 21 # questions.
duke@0 22 #
duke@0 23
duke@0 24 # @test
duke@0 25 # @bug 5055681
duke@0 26 # @summary Test loading JDI classes via custom class loader
duke@0 27
duke@0 28 if [ "${TESTJAVA}" = "" ]
duke@0 29 then
duke@0 30 echo "TESTJAVA not set. Test cannot execute. Failed."
duke@0 31 exit 1
duke@0 32 fi
duke@0 33
duke@0 34 if [ "${TESTSRC}" = "" ]
duke@0 35 then
duke@0 36 echo "TESTSRC not set. Test cannot execute. Failed."
duke@0 37 exit 1
duke@0 38 fi
duke@0 39
duke@0 40 if [ "${TESTCLASSES}" = "" ]
duke@0 41 then
duke@0 42 echo "TESTCLASSES not set. Test cannot execute. Failed."
duke@0 43 exit 1
duke@0 44 fi
duke@0 45
duke@0 46 OS=`uname -s`
duke@0 47 case "$OS" in
duke@0 48 SunOS )
duke@0 49 PS=":"
duke@0 50 ;;
duke@0 51 Linux )
duke@0 52 PS=":"
duke@0 53 ;;
ohair@2073 54 Windows* | CYGWIN*)
duke@0 55 PS=";"
duke@0 56 ;;
duke@0 57 * )
duke@0 58 echo "Unrecognized system!"
duke@0 59 exit 1;
duke@0 60 ;;
duke@0 61 esac
duke@0 62
duke@0 63 JAVAC="${TESTJAVA}"/bin/javac
duke@0 64 JAVA="${TESTJAVA}"/bin/java
duke@0 65 SOMEOTHERDIR="${TESTCLASSES}"/someotherdir
duke@0 66
duke@0 67 # Compile test into the classes directory
duke@0 68 # Compile the list connectors class into a directory that isn't on
duke@0 69 # any class path.
duke@0 70
duke@0 71 $JAVAC -d "${TESTCLASSES}" "${TESTSRC}"/JdiLoadedByCustomLoader.java
duke@0 72
duke@0 73 mkdir "${SOMEOTHERDIR}"
ohair@2073 74 $JAVAC -d "${SOMEOTHERDIR}" -classpath "${TESTSRC}${PS}${TESTJAVA}/lib/tools.jar" \
duke@0 75 "${TESTSRC}"/ListConnectors.java
duke@0 76
duke@0 77 # Run the test
duke@0 78
duke@0 79 "${JAVA}" -classpath "${TESTCLASSES}" JdiLoadedByCustomLoader \
duke@0 80 "${SOMEOTHERDIR}"