J. Duke | 319a3b9 | 2007-12-01 00:00:00 +0000 | [diff] [blame^] | 1 | # |
| 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 | |
| 32 | WORK_DIR=$1 |
| 33 | RES_DIR=$2 |
| 34 | JAVA_HOME=$3 |
| 35 | SUITE_DIR=$4 |
| 36 | NHOURS=$5 |
| 37 | shift 5 |
| 38 | VMOPTS=$* |
| 39 | |
| 40 | echo " ######### run_rmibench script ##########" |
| 41 | echo " WORK_DIR : $WORK_DIR " |
| 42 | echo " RES_DIR : $RES_DIR " |
| 43 | echo " JAVA_HOME : $JAVA_HOME " |
| 44 | echo " SUITE_DIR : $SUITE_DIR " |
| 45 | echo " NHOURS : $NHOURS " |
| 46 | echo " 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 | |
| 54 | echo " 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 | |
| 67 | sleep 10 |
| 68 | echo " 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 | |
| 81 | RETVAL=$? |
| 82 | |
| 83 | echo " RMI benchmark test finished with exit value ${RETVAL}" |
| 84 | |
| 85 | exit ${RETVAL} |
| 86 | |