Index: buildtest/branches/2.0/adaptors/specjbb2005/Cycling.java =================================================================== --- buildtest/branches/2.0/adaptors/specjbb2005/Cycling.java (revision 0) +++ buildtest/branches/2.0/adaptors/specjbb2005/Cycling.java (revision 0) @@ -0,0 +1,73 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import spec.jbb.JBBmain; + +/* + * This class is used for running of the SPEC for a given amount of time in + * the same JVM. It's intended for the purpose of stability testing. + * Note, since we don't want to force process termination, actual time of + * running is + (0..). + */ +public class Cycling { + + static long timeToRun; + + public static void main(String args[]) { + if (args.length < 1) { + printUsage(); + System.exit(1); + } + + try { + timeToRun = Long.parseLong(args[0]); + } + catch (NumberFormatException e) { + System.out.println("Invalid time to run specified: '" + args[0] + "'"); + printUsage(); + System.exit(1); + } + + // pass all arguments except zero to the SPEC + String[] argsToSpec = new String[args.length-1]; + for (int i=0; i 0) { + timeStart = System.currentTimeMillis(); + JBBmain.main(argsToSpec); + + // substract elapsed time in seconds + timeToRun -= (System.currentTimeMillis() - timeStart)/1000; + if (timeToRun >= 0) { + System.out.println("[cycle] " + timeToRun + " secs left..."); + } + } + + System.out.println("[cycle] SPEC running finished."); + } + + public static void printUsage() { + System.out.println("Usage: java -cp Cycling [parameters to pass to SPECjbb]"); + } + +} + + Index: buildtest/branches/2.0/adaptors/specjbb2005/adaptor.xml =================================================================== --- buildtest/branches/2.0/adaptors/specjbb2005/adaptor.xml (revision 0) +++ buildtest/branches/2.0/adaptors/specjbb2005/adaptor.xml (revision 0) @@ -0,0 +1,103 @@ + + + + + + + + + + + ${suite.name} setup + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${suite.name} run + + + + + + + + + + + + + + + + + ${suite.name} clean + ${suite.name} clean does nothing. + + + + Index: buildtest/branches/2.0/adaptors/specjbb2005/parameters.xml =================================================================== --- buildtest/branches/2.0/adaptors/specjbb2005/parameters.xml (revision 0) +++ buildtest/branches/2.0/adaptors/specjbb2005/parameters.xml (revision 0) @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + Index: buildtest/branches/2.0/adaptors/specjbb2005/readme.txt =================================================================== --- buildtest/branches/2.0/adaptors/specjbb2005/readme.txt (revision 0) +++ buildtest/branches/2.0/adaptors/specjbb2005/readme.txt (revision 0) @@ -0,0 +1,31 @@ +This file describes implemetation of a runner of SPECjbb2005 benchmark which +uses Build & Test Infrastructure 2.0 (HARMONY-3501). + +This readme assumes that the reader is already familiar with BT 2.0 concepts. + +It is assumed also that the one who wants to run SPECjbb2005 has the SPEC +itself installed somewhere. The path to the SPEC location should be provided +as a value to the parameter 'specjbb2005.spec.home'. Customization of SPEC +execution is performed through editing of the props file, which is pointed +by 'specjbb2005.prop.file' _optional_ parameter. By default this parameter +points to '${specjbb2005.spec.home}/SPECjbb.props' file. By default, the +SPEC will be executed with '-Xmx512m -Xms512m' options passed. This is +configurable by _optional_ parameter named 'memory'. + +There are two notification options available - if an optional parameter +'always.mail' is set to 'true', notifications are being sent after each run; +if the parameter is set to 'false', only changes between passed/failed +state are reported. + +This runner also allows running of the SPEC in the 'long' mode, which means +SPEC will be executed again and again in the same JVM until time elapses for +the purpose of stability testing. This mode is enabled by specifying a valid +value to an _optional_ parameter named 'seconds.to.run' (the time for which +the SPEC should be run, specified in seconds). + +The notification contains obtained score in the case of normal SPEC finish +(or all obtained scores for 'long' running mode), and the whole log if the +score were not obtained. Invalid scores are also treated as normal execution +since this automation is intended for catching of functional regressions, not +for precise performance measurements. +