Tue, 02 Feb 2010 10:56:10 -0800
6918625: handle annotations on array class literals
Reviewed-by: jjg, darcy
Contributed-by: mali@csail.mit.edu, mernst@cs.washington.edu
1 #!/bin/sh
3 #
4 # Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved.
5 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 #
7 # This code is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License version 2 only, as
9 # published by the Free Software Foundation.
10 #
11 # This code is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # version 2 for more details (a copy is included in the LICENSE file that
15 # accompanied this code).
16 #
17 # You should have received a copy of the GNU General Public License version
18 # 2 along with this work; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 #
21 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22 # CA 95054 USA or visit www.sun.com if you need additional information or
23 # have any questions.
24 #
27 # @test
28 # @bug 4204897 4256097 4785453 4863609
29 # @summary Test that '.jar' files in -extdirs are found.
30 # @author maddox
31 #
32 # @run shell/timeout=180 ExtDirs.sh
34 if [ "${TESTSRC}" = "" ]
35 then
36 echo "TESTSRC not set. Test cannot execute. Failed."
37 exit 1
38 fi
39 echo "TESTSRC=${TESTSRC}"
40 if [ "${TESTJAVA}" = "" ]
41 then
42 echo "TESTJAVA not set. Test cannot execute. Failed."
43 exit 1
44 fi
45 echo "TESTJAVA=${TESTJAVA}"
46 if [ "${TESTCLASSES}" = "" ]
47 then
48 echo "TESTCLASSES not set. Test cannot execute. Failed."
49 exit 1
50 fi
51 echo "TESTCLASSES=${TESTCLASSES}"
52 echo "CLASSPATH=${CLASSPATH}"
54 # set platform-dependent variables
55 OS=`uname -s`
56 case "$OS" in
57 SunOS | Linux )
58 PS=":"
59 FS="/"
60 ;;
61 CYGWIN* )
62 PS=";" # native PS, not Cygwin PS
63 FS="/"
64 ;;
65 Windows* )
66 PS=";"
67 FS="\\"
68 ;;
69 * )
70 echo "Unrecognized system!"
71 exit 1;
72 ;;
73 esac
75 fail() {
76 echo 'FAIL: unexpected result encountered'
77 exit 1
78 }
80 javac="${TESTJAVA}${FS}bin${FS}javac"
82 for i in 1 2 3; do
83 if test ! -d ext${i}; then mkdir ext${i}; fi
84 cp ${TESTSRC}${FS}ext${i}${FS}*.jar ext${i}
85 done
87 echo "Test 1"
88 $javac ${TESTTOOLVMOPTS} -d . -extdirs ext1 "${TESTSRC}${FS}ExtDirTest_1.java"
89 if [ $? -ne 0 ] ; then fail ; fi
91 echo "Test 2"
92 $javac ${TESTTOOLVMOPTS} -d . -extdirs ext1${PS}ext2 "${TESTSRC}${FS}ExtDirTest_2.java"
93 if [ $? -ne 0 ] ; then fail ; fi
95 echo "Test 3"
96 $javac ${TESTTOOLVMOPTS} -d . -extdirs ext3 "${TESTSRC}${FS}ExtDirTest_3.java"
97 if [ $? -ne 0 ] ; then fail ; fi
99 echo PASS: all tests gave expected results
100 exit 0