903N/A#
2362N/A# Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
903N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
903N/A#
903N/A# This code is free software; you can redistribute it and/or modify it
903N/A# under the terms of the GNU General Public License version 2 only, as
903N/A# published by the Free Software Foundation.
903N/A#
903N/A# This code is distributed in the hope that it will be useful, but WITHOUT
903N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
903N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
903N/A# version 2 for more details (a copy is included in the LICENSE file that
903N/A# accompanied this code).
903N/A#
903N/A# You should have received a copy of the GNU General Public License version
903N/A# 2 along with this work; if not, write to the Free Software Foundation,
903N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
903N/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.
903N/A#
903N/A
903N/A# @test
903N/A# @summary (almost) all keytool behaviors
903N/A# @author Weijun Wang
1480N/A# @run shell/timeout=600 standard.sh
903N/A#
903N/A# This test is always excecuted.
903N/A#
903N/A# set a few environment variables so that the shell-script can run stand-alone
903N/A# in the source directory
903N/Aif [ "${TESTSRC}" = "" ] ; then
903N/A TESTSRC="."
903N/Afi
903N/Aif [ "${TESTCLASSES}" = "" ] ; then
903N/A TESTCLASSES="."
903N/Afi
903N/Aif [ "${TESTJAVA}" = "" ] ; then
903N/A JAVAC_CMD=`which javac`
903N/A TESTJAVA=`dirname $JAVAC_CMD`/..
903N/Afi
903N/A
903N/A# set platform-dependent variables
903N/AOS=`uname -s`
903N/Acase "$OS" in
4638N/A SunOS | Linux | Darwin | CYGWIN* )
1486N/A FS="/"
1486N/A ;;
903N/A Windows_* )
903N/A FS="\\"
903N/A ;;
903N/A * )
1486N/A echo "Unrecognized system!"
1486N/A exit 1;
903N/A ;;
903N/Aesac
903N/A
903N/A${TESTJAVA}${FS}bin${FS}javac -d . ${TESTSRC}${FS}KeyToolTest.java || exit 10
903N/A
903N/Aecho | ${TESTJAVA}${FS}bin${FS}java -Dfile KeyToolTest
903N/Astatus=$?
903N/A
903N/Arm HumanInputStream*.class
903N/Arm KeyToolTest*.class
903N/Arm TestException.class
903N/A
903N/Aexit $status
903N/A