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 # @test
  25 #
  26 # @summary The RMI benchmark test.  This script is only
  27 #          used to run the test under JTREG.
  28 #
  29 # @build bench.BenchInfo bench.HtmlReporter bench.Util bench.Benchmark 
  30 #     bench.Reporter bench.XmlReporter bench.ConfigFormatException 
  31 #     bench.Harness bench.TextReporter bench.rmi.BenchServer 
  32 #     bench.rmi.DoubleArrayCalls bench.rmi.LongCalls bench.rmi.ShortCalls
  33 #     bench.rmi.BenchServerImpl bench.rmi.DoubleCalls 
  34 #     bench.rmi.Main bench.rmi.SmallObjTreeCalls
  35 #     bench.rmi.BooleanArrayCalls bench.rmi.ExceptionCalls 
  36 #     bench.rmi.NullCalls bench.rmi.BooleanCalls bench.rmi.ExportObjs 
  37 #     bench.rmi.ObjArrayCalls bench.rmi.ByteArrayCalls 
  38 #     bench.rmi.FloatArrayCalls bench.rmi.ObjTreeCalls
  39 #     bench.rmi.ByteCalls bench.rmi.FloatCalls bench.rmi.ProxyArrayCalls
  40 #     bench.rmi.CharArrayCalls bench.rmi.IntArrayCalls 
  41 #     bench.rmi.RemoteObjArrayCalls bench.rmi.CharCalls bench.rmi.IntCalls
  42 #     bench.rmi.ClassLoading bench.rmi.LongArrayCalls 
  43 #     bench.rmi.ShortArrayCalls bench.rmi.altroot.Node
  44 #
  45 # @run shell/timeout=1800 runRmiBench.sh
  46 #
  47 # @author Mike Warres, Nigel Daley
  48 
  49 echo "Starting RMI benchmark server "
  50 
  51 $TESTJAVA/bin/java \
  52     -server \
  53     -cp $TESTCLASSES \
  54     -Djava.security.policy=$TESTSRC/bench/rmi/policy.all \
  55     bench.rmi.Main \
  56     -server 2007 \
  57     -c $TESTSRC/bench/rmi/config &
  58 
  59 sleep 10
  60 echo "Starting RMI benchmark client "
  61 
  62 $TESTJAVA/bin/java \
  63     -client \
  64     -cp $TESTCLASSES \
  65     -Djava.security.policy=$TESTSRC/bench/rmi/policy.all \
  66     bench.rmi.Main \
  67     -client localhost:2007 \
  68     -c $TESTSRC/bench/rmi/config
  69