pkgsrc/benchmarks/hbench/patches/patch-ah
agc 31f6c67c36 Use @PREFIX@ when substituting for ${PREFIX}.
Add benchmark target to enable the benchmark to be run.
1998-09-23 16:56:00 +00:00

76 lines
2.8 KiB
Text

$NetBSD: patch-ah,v 1.2 1998/09/23 16:56:01 agc Exp $
--- scripts/maindriver.orig Sat Sep 5 09:24:50 1998
+++ scripts/maindriver Sat Sep 5 09:28:52 1998
@@ -48,9 +48,6 @@
fi
-# Step 1: Discover hbench root path
-HBENCHROOT=`(cd \`dirname $0\`/.. ; pwd)`
-
# Step 2: Get run file name, check arguments, etc
if [ $# -lt 1 ]; then
echo "Usage: `basename $0` <run_file>"
@@ -94,16 +91,16 @@
fi
if [ X${PLAINBINDIR}X = XX ]; then
- PLAINBINDIR=${HBENCHROOT}/bin/${OSTYPE}-${ARCH}
+ PLAINBINDIR=@PREFIX@/bin/hbench/${OSTYPE}-${ARCH}
fi
if [ X${CYCLECOUNTERBINDIR}X = XX ]; then
- CYCLECOUNTERBINDIR=${HBENCHROOT}/bin/${OSTYPE}-${ARCH}-c
+ CYCLECOUNTERBINDIR=@PREFIX@/bin/hbench/${OSTYPE}-${ARCH}-c
fi
if [ X${EVENTCOUNTERBINDIR}X = XX ]; then
- EVENTCOUNTERBINDIR=${HBENCHROOT}/bin/${OSTYPE}-${ARCH}-ec
+ EVENTCOUNTERBINDIR=@PREFIX@/bin/hbench/${OSTYPE}-${ARCH}-ec
fi
if [ X${RESULTDIRBASE}X = XX ]; then
- RESULTDIRBASE=${HBENCHROOT}/Results/${OSTYPE}-${ARCH}
+ RESULTDIRBASE=@PREFIX@/share/hbench/Results/${OSTYPE}-${ARCH}
fi
RESULTDIRB=${RESULTDIRBASE}/${SYSTEMNAME}
@@ -120,10 +117,10 @@
TESTS=${TESTFILE}
elif [ -f ${TESTFILE}.test ]; then
TESTS=${TESTFILE}.test
-elif [ -f ${HBENCHROOT}/conf/${TESTFILE} ]; then
- TESTS=${HBENCHROOT}/conf/${TESTFILE}
-elif [ -f ${HBENCHROOT}/conf/${TESTFILE}.test ]; then
- TESTS=${HBENCHROOT}/conf/${TESTFILE}.test
+elif [ -f @PREFIX@/share/hbench/conf/${TESTFILE} ]; then
+ TESTS=@PREFIX@/share/hbench/conf/${TESTFILE}
+elif [ -f @PREFIX@/share/hbench/conf/${TESTFILE}.test ]; then
+ TESTS=@PREFIX@/share/hbench/conf/${TESTFILE}.test
else
echo "Unable to locate test file ${TESTFILE}."
echo "Fix run file $1 and retry"
@@ -427,9 +424,9 @@
;;
esac
else
- ${RCP} ${HBENCHROOT}/scripts/config.guess ${machine}:/tmp/get-os
+ ${RCP} @PREFIX@/bin/hbench/config.guess ${machine}:/tmp/get-os
REMOTEOS=`$RSH $machine -n /tmp/get-os | sed 's/^.*-.*-//`
- ${RCP} ${HBENCHROOT}/bin/${REMOTEOS}/$1 ${machine}:/tmp
+ ${RCP} @PREFIX@/bin/hbench/${REMOTEOS}/$1 ${machine}:/tmp
$RSH $machine -n /tmp/$1 0 $3 -s 2>> $STDERR &
fi
@@ -788,12 +785,12 @@
if [ X`perl -e 'print "perltest\n";' 2>&1`X = XperltestX ]; then
echo $ECHON "Generating summary information...${ECHOC}"
rm -f ${RESULTDIR}/summary
- ${HBENCHROOT}/scripts/gen-summary ${RESULTDIR} > ${RESULTDIR}/summary
+ @PREFIX@/bin/hbench/gen-summary ${RESULTDIR} > ${RESULTDIR}/summary
echo "done."
echo $ECHON "Performing basic automated data analysis...${ECHOC}"
rm -f ${RESULTDIR}/analysis
- ${HBENCHROOT}/scripts/gen-analysis ${RESULTDIR} > ${RESULTDIR}/analysis
+ @PREFIX@/bin/hbench/gen-analysis ${RESULTDIR} > ${RESULTDIR}/analysis
echo "done."
if [ `cat $RESULTDIR/errors | wc -l` -gt 0 ]; then