#!/bin/sh usage() { echo "usage: `basename $0` [-p ARG] " } help() { usage cat <<\EOF -v Debug -h help -p pass -o optimization -q flavour -n nevents run10KTest -p 1 runs 10K test pass 1 and stores the results in ./pass1 subdirectory of a test release EOF exit 1 } #------------------------------------------------------------------------------ gaspanddie() { echo "Press control C to exit (or wait 100 s)" sleep 100 exit 1 } #------------------------------------------------------------------------------ # Get the options (options with a : after them take an argument) #----------------------------------------------------------------------- export WORK_DIR=$PWD debug="false" notgotfile="true" offlineversion="" patch="" pass="" flavour=GCC_3_4 opt=default export NEVENTS="" noof="true" notgotpass="true" PROCESS10K=$WORK_DIR/cdfopr/scripts/process10K while getopts :hn:o:p:q:v: OPT; do case $OPT in h) # help help ;; n) # number of events to process, default: all the events in the input file export NEVENTS=${OPTARG} ;; o) # optimization opt=${OPTARG} ;; p) # Pass pass=${OPTARG} notgotpass="false" ;; q) # flavour flavour=$OPTARG ;; v) # debug export DEBUG_SCRIPT=yes ;; *) usage exit 1 esac done offline_version=`cat .base_release` # echo offline_version = $offline_version if ${notgotpass}; then echo "need a pass" usage gaspanddie fi list_of_files=$PWD/pass${pass}/files_to_process.txt list=`cat ${list_of_files} | awk '{ if (substr($1,1,1) != "#") print $0}'` for RFILE in $list; do printf "%s\n" $RFILE if [ .$DEBUG_SCRIPT != "." ] ; then echo $PROCESS10K -f $RFILE -o $opt -p $pass -q $flavour -v $offlineversion fi $PROCESS10K -f $RFILE -o $opt -p $pass -q $flavour -v $offlineversion & sleep 30 xterm -sl 10000 -title $RFILE -n $RFILE \ -e tail -f $PWD/pass${pass}/$RFILE/$RFILE.log & sleep 1 done termname=top-lnx1 xterm -sl 10000 -title $termname -n $termname -e top &