Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/test/sun/security/pkcs11/Provider/ConfigQuotedString.sh
38855 views
#1# Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.2# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3#4# This code is free software; you can redistribute it and/or modify it5# under the terms of the GNU General Public License version 2 only, as6# published by the Free Software Foundation.7#8# This code is distributed in the hope that it will be useful, but WITHOUT9# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11# version 2 for more details (a copy is included in the LICENSE file that12# accompanied this code).13#14# You should have received a copy of the GNU General Public License version15# 2 along with this work; if not, write to the Free Software Foundation,16# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17#18# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19# or visit www.oracle.com if you need additional information or have any20# questions.21#2223# @test24# @bug 507077325# @summary SunPKCS11 provider does not support spaces config's provider name26# @run shell ConfigQuotedString.sh2728# set a few environment variables so that the shell-script can run stand-alone29# in the source directory3031# if running by hand on windows, change TESTSRC and TESTCLASSES to "."32if [ "${TESTSRC}" = "" ] ; then33TESTSRC=`pwd`34fi35if [ "${TESTCLASSES}" = "" ] ; then36TESTCLASSES=`pwd`37fi3839# if running by hand on windows, change this to appropriate value40if [ "${TESTJAVA}" = "" ] ; then41TESTJAVA="/net/radiant/export1/charlie/mustang/build/solaris-sparc"42fi43if [ "${COMPILEJAVA}" = "" ]; then44COMPILEJAVA="${TESTJAVA}"45fi46echo TESTSRC=${TESTSRC}47echo TESTCLASSES=${TESTCLASSES}48echo TESTJAVA=${TESTJAVA}49echo COMPILEJAVA=${COMPILEJAVA}50echo ""5152# let java test exit if platform unsupported5354OS=`uname -s`55case "$OS" in56SunOS )57FS="/"58PS=":"59CP="${FS}bin${FS}cp"60CHMOD="${FS}bin${FS}chmod"61;;62Linux )63FS="/"64PS=":"65CP="${FS}bin${FS}cp"66CHMOD="${FS}bin${FS}chmod"67;;68Darwin )69FS="/"70PS=":"71CP="${FS}bin${FS}cp"72CHMOD="${FS}bin${FS}chmod"73;;74AIX )75FS="/"76PS=":"77CP="${FS}bin${FS}cp"78CHMOD="${FS}bin${FS}chmod"79;;80Windows* )81FS="\\"82PS=";"83CP="cp"84CHMOD="chmod"85;;86CYGWIN* )87FS="/"88PS=";"89CP="cp"90CHMOD="chmod"91#92# javac does not like /cygdrive produced by `pwd`93#94TESTSRC=`cygpath -d ${TESTSRC}`95;;96* )97echo "Unrecognized system!"98exit 1;99;;100esac101102# compile test103104${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} \105-classpath ${TESTSRC}${FS}.. \106-d ${TESTCLASSES} \107${TESTSRC}${FS}ConfigQuotedString.java \108${TESTSRC}${FS}..${FS}PKCS11Test.java109110# run test111112${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} \113-classpath ${TESTCLASSES} \114-DCUSTOM_P11_CONFIG=${TESTSRC}${FS}ConfigQuotedString-nss.txt \115-Dtest.src=${TESTSRC} \116-Dtest.classes=${TESTCLASSES} \117ConfigQuotedString118119# save error status120status=$?121122# return123exit $status124125126