1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
|
#!/bin/sh
# the total time of the (imaginary) reference system
REF_TIME=43.26
# try to figure out which syntax we need
# to prevent a linefeed at the end of echo
# Some versions of sh use -n as an option
# others use \c at the end of the line.
# This is just for cosmetic reasons...
A=`echo "\c"|grep c`
if test "$A" != "" ; then
A=`echo -n "k"|grep n`
if test "$A" = "" ; then
ECHO="echo -n "
SUFFIX=""
else
ECHO="echo"
SUFFIX=""
fi
else
ECHO="echo"
SUFFIX="\c"
fi
echo " "
echo "Now running all BALL benchmarks."
echo " "
echo "This will take some time...."
echo " "
# remember any failed benchmarks by setting OK=false
OK=true
# remove any core in the directory and all backtrace files
rm core *.backtrace 2>/dev/null
# loop over all single benchmarks
COUNT=1
TOTAL_TIME=0.0
for i in $* ; do
# print the name of the benchmark running
$ECHO " (${COUNT}) $i: $SUFFIX"
# remove potential log files
rm $i.log 2>/dev/null
# run it and examine its return value
TIME=`./$i 2>/dev/null`
if test $? -eq 0 ; then
# test passed - OK
echo "${TIME} s"
TOTAL_TIME=`echo ${TOTAL_TIME} ${TIME}|awk '{print 1.0 * $1 + 1.0 * $2}'`
else
# benchmark crashed
OK=false
# remember this benchmark program
FAILED_BENCHS="${FAILED_BENCHS} $i"
fi
COUNT=`expr ${COUNT} + 1`
done
# print a summary of all benchmarks
echo "====================================="
echo " "
if test "$OK" = true ; then
echo "All benchmarks executed."
echo "Total net time required: ${TOTAL_TIME} s."
echo "Your system scores `echo ${TOTAL_TIME} ${REF_TIME}|awk '{printf \"%.2f\", $2/$1}'` BALLStones"
echo " "
exit 0
else
echo "The following benchmarks failed:"
for i in ${FAILED_BENCHS} ; do
echo " - $i"
done
echo " "
echo "Please mail the output of this run to one of the developers"
echo "and include a detailed description of the system you use."
echo "It is also neccessary to include the files ../config.mak ../config.h"
echo " "
exit 1
fi
|