2034N/A#
3579N/A# Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved.
2034N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2034N/A#
2034N/A# This code is free software; you can redistribute it and/or modify it
2034N/A# under the terms of the GNU General Public License version 2 only, as
2034N/A# published by the Free Software Foundation.
2034N/A#
2034N/A# This code is distributed in the hope that it will be useful, but WITHOUT
2034N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2034N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2034N/A# version 2 for more details (a copy is included in the LICENSE file that
2034N/A# accompanied this code).
2034N/A#
2034N/A# You should have received a copy of the GNU General Public License version
2034N/A# 2 along with this work; if not, write to the Free Software Foundation,
2034N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2034N/A#
2362N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A# or visit www.oracle.com if you need additional information or have any
2362N/A# questions.
2034N/A#
2034N/A
2034N/A#
2034N/A# @test
2034N/A# @bug 6370923
3579N/A# @summary SecretKeyFactory failover does not work
2034N/A# @author Brad R. Wetmore
2034N/A#
2034N/A
2034N/Aif [ "${TESTJAVA}" = "" ]
2034N/Athen
2034N/A echo "TESTJAVA not set. Test cannot execute. Failed."
2034N/A exit 1
2034N/Afi
2034N/Aecho "TESTJAVA=${TESTJAVA}"
2034N/A
2034N/Aif [ "${TESTSRC}" = "" ]
2034N/Athen
5496N/A TESTSRC="."
5496N/Afi
2034N/Aecho "TESTSRC=${TESTSRC}"
5496N/A
5496N/A
5496N/Aif [ "${TESTCLASSES}" = "" ]
2034N/Athen
5496N/A TESTCLASSES="."
2034N/Afi
2034N/Aecho "TESTCLASSES=${TESTCLASSES}"
2034N/A
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux | Darwin )
NULL=/dev/null
PS=":"
FS="/"
;;
CYGWIN* )
NULL=/dev/null
PS=";"
FS="/"
;;
Windows* )
NULL=NUL
PS=";"
FS="\\"
;;
* )
echo "Unrecognized system!"
exit 1;
;;
esac
${TESTJAVA}${FS}bin${FS}javac \
-d . \
-classpath "${TESTSRC}${FS}P1.jar${PS}${TESTSRC}${FS}P2.jar" \
${TESTSRC}${FS}FailOverTest.java
if [ $? -ne 0 ]; then
exit 1
fi
${TESTJAVA}${FS}bin${FS}java \
-classpath "${TESTSRC}${FS}P1.jar${PS}${TESTSRC}${FS}P2.jar${PS}." \
FailOverTest
result=$?
if [ $result -eq 0 ]
then
echo "Passed"
else
echo "Failed"
fi
exit $result