annotate test/sun/security/pkcs11/Provider/ConfigQuotedString.sh @ 6581:cea72c2bf071

7197491: update copyright year to match last edit in jdk8 jdk repository Reviewed-by: chegar, ksrini
author alanb
date Fri, 02 Nov 2012 15:50:11 +0000
parents d45bc4307996
children ae5d04dbacd6
rev   line source
duke@0 1 #
alanb@6581 2 # Copyright (c) 2004, 2012, 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 5070773
duke@0 26 # @summary SunPKCS11 provider does not support spaces config's provider name
duke@0 27 # @run shell ConfigQuotedString.sh
duke@0 28
duke@0 29 # set a few environment variables so that the shell-script can run stand-alone
duke@0 30 # in the source directory
duke@0 31
duke@0 32 # if running by hand on windows, change TESTSRC and TESTCLASSES to "."
duke@0 33 if [ "${TESTSRC}" = "" ] ; then
duke@0 34 TESTSRC=`pwd`
duke@0 35 fi
duke@0 36 if [ "${TESTCLASSES}" = "" ] ; then
duke@0 37 TESTCLASSES=`pwd`
duke@0 38 fi
duke@0 39
duke@0 40 # if running by hand on windows, change this to appropriate value
duke@0 41 if [ "${TESTJAVA}" = "" ] ; then
duke@0 42 TESTJAVA="/net/radiant/export1/charlie/mustang/build/solaris-sparc"
duke@0 43 fi
duke@0 44 echo TESTSRC=${TESTSRC}
duke@0 45 echo TESTCLASSES=${TESTCLASSES}
duke@0 46 echo TESTJAVA=${TESTJAVA}
duke@0 47 echo ""
duke@0 48
duke@0 49 # let java test exit if platform unsupported
duke@0 50
duke@0 51 OS=`uname -s`
duke@0 52 case "$OS" in
duke@0 53 SunOS )
duke@0 54 FS="/"
duke@0 55 PS=":"
duke@0 56 CP="${FS}bin${FS}cp"
duke@0 57 CHMOD="${FS}bin${FS}chmod"
duke@0 58 ;;
duke@0 59 Linux )
duke@0 60 FS="/"
duke@0 61 PS=":"
duke@0 62 CP="${FS}bin${FS}cp"
duke@0 63 CHMOD="${FS}bin${FS}chmod"
duke@0 64 ;;
michaelm@5177 65 Darwin )
michaelm@5177 66 FS="/"
michaelm@5177 67 PS=":"
michaelm@5177 68 CP="${FS}bin${FS}cp"
michaelm@5177 69 CHMOD="${FS}bin${FS}chmod"
michaelm@5177 70 ;;
duke@0 71 Windows* )
duke@0 72 FS="\\"
duke@0 73 PS=";"
duke@0 74 CP="cp"
duke@0 75 CHMOD="chmod"
duke@0 76 ;;
wetmore@1486 77 CYGWIN* )
wetmore@1486 78 FS="/"
wetmore@1486 79 PS=";"
wetmore@1486 80 CP="cp"
wetmore@1486 81 CHMOD="chmod"
wetmore@1486 82 #
wetmore@1486 83 # javac does not like /cygdrive produced by `pwd`
wetmore@1486 84 #
wetmore@1486 85 TESTSRC=`cygpath -d ${TESTSRC}`
wetmore@1486 86 ;;
wetmore@1486 87 * )
wetmore@1486 88 echo "Unrecognized system!"
wetmore@1486 89 exit 1;
wetmore@1486 90 ;;
duke@0 91 esac
duke@0 92
duke@0 93 # compile test
duke@0 94
duke@0 95 ${TESTJAVA}${FS}bin${FS}javac \
michaelm@5177 96 -classpath ${TESTSRC}${FS}.. \
michaelm@5177 97 -d ${TESTCLASSES} \
michaelm@5177 98 ${TESTSRC}${FS}ConfigQuotedString.java
duke@0 99
duke@0 100 # run test
duke@0 101
duke@0 102 ${TESTJAVA}${FS}bin${FS}java \
michaelm@5177 103 -classpath ${TESTCLASSES} \
michaelm@5177 104 -DCUSTOM_P11_CONFIG=${TESTSRC}${FS}ConfigQuotedString-nss.txt \
michaelm@5177 105 -Dtest.src=${TESTSRC} \
michaelm@5177 106 -Dtest.classes=${TESTCLASSES} \
michaelm@5177 107 ConfigQuotedString
duke@0 108
duke@0 109 # save error status
duke@0 110 status=$?
duke@0 111
duke@0 112 # return
duke@0 113 exit $status