1#
2# Copyright (c) 2005, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20# or visit www.oracle.com if you need additional information or have any
21# questions.
22#
23
24#!/bin/ksh
25#
26# Script to build and launch the Serialization 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_serialbench 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/serial/*.java \
51    ${SUITE_DIR}/benchmark/bench/*.java
52
53echo "          Starting serialization benchmark "
54
55${JAVA_HOME}/bin/java \
56    $VMOPTS \
57    -cp $WORK_DIR \
58    bench.serial.Main \
59    -t $NHOURS \
60    -v \
61    -c ${SUITE_DIR}/benchmark/bench/serial/config \
62    > ${RES_DIR}/log.serialbench 2>&1 &
63
64RETVAL=$?
65
66echo "     Serialization benchmark test finished with exit value ${RETVAL}"
67
68exit ${RETVAL}
69
70