File xenpaging_kernbench_test.sh of Package xenpaging-scripts

#!/bin/bash
set -e
set -x
unset LANG
unset ${!LC_*}

d=xenpaging_kernbench_test
kver=2.6.0
kbver=0.50
cd /abuild
rm -rf ${d}
mkdir ${d}
cd ${d}
time wget -m -np -nv http://bax.arch.suse.de/~olaf/mirror/
kernel=$( find * -name linux-${kver}.tar.bz2 )
kernbench=$( find * -name kernbench-${kbver}.tar.bz2 )
if test -z "${kernel}" || test -z "${kernbench}"
then
	echo "download failed?"
	exit 1
fi
patchdir=$( dirname ${kernel} )
time tar xfa ${kernbench}
time tar xfa ${kernel}
mv -v linux-${kver} linux
mv -v kernbench-${kbver} kernbench
mkdir -v patches
for p in {1..35}
do
	pf=patch-2.6.${p}.bz2
	ln -v ${patchdir}/${pf} patches
	echo ${pf} >> patches/series
done
pf=patch-2.6.${p}.1.bz2
if test -f ${patchdir}/${pf}
then
	ln -v ${patchdir}/${pf} patches
	echo ${pf} >> patches/series
fi
cd linux
ln -sfvbn ../patches .
for p in `cat patches/series`
do
	echo $p
	bzip2 -cd  patches/$p | patch -s -p1 -E
done
time bash ../kernbench/kernbench -M # -n 42
openSUSE Build Service is sponsored by