0N/A#
2362N/A# Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
0N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A#
0N/A# This code is free software; you can redistribute it and/or modify it
0N/A# under the terms of the GNU General Public License version 2 only, as
0N/A# published by the Free Software Foundation.
0N/A#
0N/A# This code is distributed in the hope that it will be useful, but WITHOUT
0N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A# version 2 for more details (a copy is included in the LICENSE file that
0N/A# accompanied this code).
0N/A#
0N/A# You should have received a copy of the GNU General Public License version
0N/A# 2 along with this work; if not, write to the Free Software Foundation,
0N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/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.
0N/A#
0N/A
0N/A#!/bin/ksh
0N/A#
0N/A# Script to build and launch the RMI reliability suite.
0N/A# This script is used to run the reliability test for a
0N/A# certain number of hours. This script is NOT used when
0N/A# running the juicer and benchmark tests as part of the
0N/A# jtreg regression suite.
0N/A
0N/AJAVA_HOME=$1
0N/AWORK_DIR=$2
0N/ARES_DIR=$3
0N/ASHELLTOUSE=$4
0N/ASUITE_DIR=$5
0N/ANHOURS=$6
0N/Ashift 6
0N/AVMOPTS=$*
0N/A
0N/A###You need not export these variables if your reliability run is from this shell itself######
0N/A###If you are launching another shell then you need to export these variables.#######
0N/A
0N/Aif [ "${WORK_DIR}" = "" ] ; then
0N/A WORK_DIR=`pwd`
0N/Afi
0N/Aif [ "${RES_DIR}" = "" ] ; then
0N/A RES_DIR=`pwd`/results
0N/Afi
0N/Aif [ "${SHELLTOUSE}" = "" ] ; then
0N/A SHELLTOUSE=ksh
0N/Afi
0N/Aif [ "${JAVA_HOME}" = "" ] ; then
0N/A WHENCEJAVA=`whence java`
0N/A JAVABIN=`dirname ${WHENCEJAVA}`
0N/A JAVA_HOME=`dirname ${JAVABIN}`
0N/Afi
0N/Aif [ "${SUITE_DIR}" = "" ] ; then
0N/A SUITE_DIR=`pwd`
0N/Afi
0N/Aif [ "${VMOPTS}" = "" ] ; then
0N/A VMOPTS=-server -showversion
0N/Afi
0N/Aif [ "${NHOURS}" = "" ] ; then
0N/A NHOURS=1
0N/Afi
0N/A
0N/Aexport JAVA_HOME
0N/Aexport WORK_DIR
0N/Aexport RES_DIR
0N/Aexport SHELLTOUSE
0N/Aexport SUITE_DIR
0N/Aexport NHOURS
0N/Aexport VMOPTS
0N/A
0N/Aecho "######### launch_reliability script ##########"
0N/Aecho "JAVA_HOME : $JAVA_HOME "
0N/Aecho "WORK_DIR : $WORK_DIR "
0N/Aecho "RES_DIR : $RES_DIR "
0N/Aecho "SHELLTOUSE : $SHELLTOUSE "
0N/Aecho "SUITE_DIR : $SUITE_DIR "
0N/Aecho "NHOURS : $NHOURS "
0N/Aecho "VMOPTS : $VMOPTS "
0N/A
0N/A
0N/A# set platform-dependent variables
0N/Aif [ `uname` = "SunOS" ] ; then
0N/A PATH_SEP=":"
0N/A
0N/Aelif [ `uname` = "Linux" ] ; then
0N/A PATH_SEP=":"
0N/Aelse
0N/A PATH_SEP=";"
0N/Afi
0N/A
0N/Aexport PATH_SEP
0N/Amainpid=$$
0N/A
0N/Amkdir -p ${RES_DIR}
0N/A
0N/Arm -rf ${WORK_DIR}/rmibench_scratch
0N/Arm -rf ${WORK_DIR}/serialbench_scratch
0N/Arm -rf ${WORK_DIR}/juicer_scratch
0N/Amkdir -p ${WORK_DIR}/rmibench_scratch
0N/Amkdir -p ${WORK_DIR}/serialbench_scratch
0N/Amkdir -p ${WORK_DIR}/juicer_scratch
0N/A
0N/Aecho ""
0N/Aecho " Starting RMI bench test "
0N/A$SHELLTOUSE ${SUITE_DIR}/scripts/run_rmibench.ksh ${WORK_DIR}/rmibench_scratch $RES_DIR $JAVA_HOME $SUITE_DIR $NHOURS $VMOPTS &
0N/Apid1=$!
0N/A
0N/Asleep 30
0N/Aecho ""
0N/Aecho " Starting Serialization bench test "
0N/A$SHELLTOUSE ${SUITE_DIR}/scripts/run_serialbench.ksh ${WORK_DIR}/serialbench_scratch $RES_DIR $JAVA_HOME $SUITE_DIR $NHOURS $VMOPTS &
0N/Apid2=$!
0N/A
0N/Asleep 30
0N/Aecho ""
0N/Aecho " Starting RMI juicer test "
0N/A$SHELLTOUSE ${SUITE_DIR}/scripts/run_juicer.ksh ${WORK_DIR}/juicer_scratch $RES_DIR $JAVA_HOME $SUITE_DIR $NHOURS $VMOPTS &
0N/Apid3=$!
0N/A
0N/Asleep 30
0N/Aecho ""
0N/Aecho " Waiting for jobs to complete"
0N/A
0N/Await $pid1 $pid2 $pid3
0N/A
0N/Aecho ""
0N/Aecho " Done RMI reliability testing "
0N/A
0N/Arm -rf ${WORK_DIR}/rmibench_scratch
0N/Arm -rf ${WORK_DIR}/serialbench_scratch
0N/Arm -rf ${WORK_DIR}/juicer_scratch
0N/A
0N/Akill -9 $mainpid
0N/A