blob: 337db390c5d6f2ffb16c4a2b52b245edc8eeae23 [file] [log] [blame]
J. Duke319a3b92007-12-01 00:00:00 +00001#
2# Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved.
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# This code is free software; you can redistribute it and/or modify it
6# under the terms of the GNU General Public License version 2 only, as
7# published by the Free Software Foundation.
8#
9# This code is distributed in the hope that it will be useful, but WITHOUT
10# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12# version 2 for more details (a copy is included in the LICENSE file that
13# accompanied this code).
14#
15# You should have received a copy of the GNU General Public License version
16# 2 along with this work; if not, write to the Free Software Foundation,
17# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18#
19# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
20# CA 95054 USA or visit www.sun.com if you need additional information or
21# have any questions.
22#
23
24#!/bin/ksh
25#
26# Script to build and launch the RMI bench test as part of
27# the RMI reliability test. This script is used to run
28# the bench test for a certain number of hours. This
29# script is NOT used when running the bench test as part
30# of the jtreg regression suite.
31
32WORK_DIR=$1
33RES_DIR=$2
34JAVA_HOME=$3
35SUITE_DIR=$4
36NHOURS=$5
37shift 5
38VMOPTS=$*
39
40echo " ######### run_rmibench script ##########"
41echo " WORK_DIR : $WORK_DIR "
42echo " RES_DIR : $RES_DIR "
43echo " JAVA_HOME : $JAVA_HOME "
44echo " SUITE_DIR : $SUITE_DIR "
45echo " NHOURS : $NHOURS "
46echo " VMOPTS : $VMOPTS "
47
48${JAVA_HOME}/bin/javac \
49 -d $WORK_DIR \
50 ${SUITE_DIR}/benchmark/bench/rmi/altroot/*.java \
51 ${SUITE_DIR}/benchmark/bench/rmi/*.java \
52 ${SUITE_DIR}/benchmark/bench/*.java
53
54echo " Starting RMI benchmark server "
55
56${JAVA_HOME}/bin/java \
57 $VMOPTS \
58 -cp $WORK_DIR \
59 -Djava.security.policy=${SUITE_DIR}/benchmark/bench/rmi/policy.all \
60 bench.rmi.Main \
61 -t $NHOURS \
62 -v \
63 -server 2007 \
64 -c ${SUITE_DIR}/benchmark/bench/rmi/config \
65 > ${RES_DIR}/log.rmibench.server 2>&1 &
66
67sleep 10
68echo " Starting RMI benchmark client "
69
70${JAVA_HOME}/bin/java \
71 $VMOPTS \
72 -cp $WORK_DIR \
73 -Djava.security.policy=${SUITE_DIR}/benchmark/bench/rmi/policy.all \
74 bench.rmi.Main \
75 -t $NHOURS \
76 -v \
77 -client localhost:2007 \
78 -c ${SUITE_DIR}/benchmark/bench/rmi/config \
79 > ${RES_DIR}/log.rmibench.client 2>&1
80
81RETVAL=$?
82
83echo " RMI benchmark test finished with exit value ${RETVAL}"
84
85exit ${RETVAL}
86