test/tools/apt/Misc/misc.sh

Tue, 23 Mar 2010 18:05:54 -0700

author
jjg
date
Tue, 23 Mar 2010 18:05:54 -0700
changeset 528
dd30de080cb9
parent 1
9a66ca7c79fa
child 554
9d9f26857129
permissions
-rw-r--r--

6937244: sqe ws7 tools javap/javap_t10a fail jdk7 b80 used output of javap is changed
Reviewed-by: darcy

     1 #!/bin/sh
     3 #
     4 # Copyright 2004-2007 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 #
    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;

mercurial