jdk/test/java/rmi/reliability/launch_reliability.ksh
author amurillo
Wed, 15 Aug 2012 16:49:38 -0700
changeset 13465 d3fc5d192448
parent 5506 202f599c92aa
permissions -rw-r--r--
7191765: make jdk8 the default jprt release for hs24 Reviewed-by: jcoomes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     2
# Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
# published by the Free Software Foundation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
# This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
# version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
# accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
# You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
# 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
#
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    19
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    20
# or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
# questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
#!/bin/ksh
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
# Script to build and launch the RMI reliability suite.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
# This script is used to run the reliability test for a 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
# certain number of hours.  This script is NOT used when 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
# running the juicer and benchmark tests as part of the 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
# jtreg regression suite.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
JAVA_HOME=$1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
WORK_DIR=$2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
RES_DIR=$3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
SHELLTOUSE=$4
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
SUITE_DIR=$5
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
NHOURS=$6
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
shift 6
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
VMOPTS=$*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
###You need not export these variables if your reliability run is from this shell itself######
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
###If you are launching another shell then you need to export these variables.#######
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
if [ "${WORK_DIR}" = "" ] ; then
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
	WORK_DIR=`pwd`
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
if [ "${RES_DIR}" = "" ] ; then
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
	RES_DIR=`pwd`/results
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
if [ "${SHELLTOUSE}" = "" ] ; then
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
	SHELLTOUSE=ksh
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
if [ "${JAVA_HOME}" = "" ] ; then
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
	WHENCEJAVA=`whence java`
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
	JAVABIN=`dirname ${WHENCEJAVA}`
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
	JAVA_HOME=`dirname ${JAVABIN}`
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
if [ "${SUITE_DIR}" = "" ] ; then
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
	SUITE_DIR=`pwd`
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
if [ "${VMOPTS}" = "" ] ; then
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
	VMOPTS=-server -showversion
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
if [ "${NHOURS}" = "" ] ; then
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
	NHOURS=1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
export JAVA_HOME
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
export WORK_DIR
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
export RES_DIR
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
export SHELLTOUSE
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
export SUITE_DIR
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
export NHOURS
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
export VMOPTS
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
echo "######### launch_reliability script ##########"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
echo "JAVA_HOME : $JAVA_HOME "
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
echo "WORK_DIR : $WORK_DIR "
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
echo "RES_DIR : $RES_DIR "
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
echo "SHELLTOUSE : $SHELLTOUSE "
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
echo "SUITE_DIR : $SUITE_DIR "
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
echo "NHOURS : $NHOURS "
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
echo "VMOPTS : $VMOPTS "
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
# set platform-dependent variables
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
if [ `uname` = "SunOS" ] ; then
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
        PATH_SEP=":"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
elif [ `uname` = "Linux" ] ; then
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
        PATH_SEP=":"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
        PATH_SEP=";"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
export PATH_SEP
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
mainpid=$$
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
mkdir -p ${RES_DIR}
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
rm -rf ${WORK_DIR}/rmibench_scratch
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
rm -rf ${WORK_DIR}/serialbench_scratch
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
rm -rf ${WORK_DIR}/juicer_scratch
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
mkdir -p ${WORK_DIR}/rmibench_scratch
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
mkdir -p ${WORK_DIR}/serialbench_scratch
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
mkdir -p ${WORK_DIR}/juicer_scratch
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
echo ""
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
echo "     Starting RMI bench test "
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
$SHELLTOUSE ${SUITE_DIR}/scripts/run_rmibench.ksh ${WORK_DIR}/rmibench_scratch $RES_DIR $JAVA_HOME $SUITE_DIR $NHOURS $VMOPTS &
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
pid1=$!
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
sleep 30
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
echo ""
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
echo "     Starting Serialization bench test "
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
$SHELLTOUSE ${SUITE_DIR}/scripts/run_serialbench.ksh ${WORK_DIR}/serialbench_scratch $RES_DIR $JAVA_HOME $SUITE_DIR $NHOURS $VMOPTS &
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
pid2=$!
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
sleep 30
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
echo ""
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
echo "     Starting RMI juicer test "
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
$SHELLTOUSE ${SUITE_DIR}/scripts/run_juicer.ksh ${WORK_DIR}/juicer_scratch $RES_DIR $JAVA_HOME $SUITE_DIR $NHOURS $VMOPTS &
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
pid3=$!
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
sleep 30
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
echo ""
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
echo "     Waiting for jobs to complete"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
wait $pid1 $pid2 $pid3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
echo ""
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
echo "     Done RMI reliability testing "
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
rm -rf ${WORK_DIR}/rmibench_scratch
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
rm -rf ${WORK_DIR}/serialbench_scratch
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
rm -rf ${WORK_DIR}/juicer_scratch
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
kill -9 $mainpid 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139