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