Tue, 25 May 2010 15:54:51 -0700
6943119: Rebrand source copyright notices
Reviewed-by: darcy
1 #!/bin/sh
3 #
4 # Copyright (c) 2004, 2007, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 # or visit www.oracle.com if you need additional information or have any
23 # questions.
24 #
26 # @test
27 # @bug 5007250
28 # @run shell ../verifyVariables.sh
29 # @run shell misc.sh
30 # @summary Miscelleneous tests
31 # @author Joseph D. Darcy
33 OS=`uname -s`;
34 case "${OS}" in
35 Windows* | CYGWIN* )
36 SEP=";"
37 ;;
39 * )
40 SEP=":"
41 ;;
42 esac
44 JARCP=misc.jar
45 SOURCEP=${TESTSRC}
47 # Construct path to apt executable
48 APT="${TESTJAVA}/bin/apt ${TESTTOOLVMOPTS} -nocompile "
50 printf "%s\n" "APT = ${APT}"
52 # Construct path to javac executable
53 JAVAC="${TESTJAVA}/bin/javac ${TESTTOOLVMOPTS} -source 1.5 -sourcepath ${TESTSRC} -classpath ${TESTJAVA}/lib/tools.jar -d . "
54 JAR="${TESTJAVA}/bin/jar "
56 ${JAVAC} ${TESTSRC}/Misc.java ${TESTSRC}/Marked.java
57 RESULT=$?
59 case "${RESULT}" in
60 0 )
61 ;;
63 * )
64 echo "Compilation failed."
65 exit 1
66 esac
69 echo "Making services directory and copying services information."
70 mkdir -p META-INF/services
72 cp ${TESTSRC}/servicesMisc META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory
74 ${JAR} cf0 misc.jar Misc*.class META-INF
76 # Jar files created; verify options properly present on both initial
77 # and recursive apt runs
79 #---------------------------------------------------------
81 unset CLASSPATH
83 printf "%s\n" "-classpath ${JARCP}" > options
84 printf "%s\n" "-sourcepath ${SOURCEP}" >> options
85 printf "%s\n" "${TESTSRC}/Marked.java" >> options
87 ${APT} @options
89 RESULT=$?
90 case "${RESULT}" in
91 0 )
92 ;;
94 * )
95 echo "Problem with result"
96 exit 1
97 ;;
98 esac
100 exit 0;