## http://www.apache.org/licenses/LICENSE-2.0
###############################################################################
+source utils.sh
-rpmdir=${1:-"/root/workspace/"}
-rpmpat="kernel-4.1*.rpm"
-rpm -ihv ${rpmdir}/rt-tests-0.96-1.el7.centos.x86_64.rpm
+KERNEL_VERSION=$( getKernelVersion )
+if [ -z $KERNEL_VERSION ];then
+ echo "Kernel RPM not found"
+ exit 1
+fi
+rpmdir=${1:-"/root/workspace/rpm"}
+rpmpat="kernel-${KERNEL_VERSION}*.rpm"
guest_isolcpus=1
-# The script's caller should passing the rpm directory that is built out from
+# The script's caller should passing the rpm directory that is built out from
# build.sh. The default rpmdir is the one used by yardstick scripts.
install_kernel () {
# Install the kernel rpm
filenum=`ls -l ${rpmdir}/${rpmpat} |wc -l`
if [ $filenum -eq 0 ]
then
- echo "No kernel rpm found in workspace/rpm"
- exit 1
+ echo "No kernel rpm found in workspace/rpm"
+ exit 1
elif [ $filenum -gt 1 ]
then
- echo "Multiple kernel rpm found in workspace/rpm"
- exit 1
+ echo "Multiple kernel rpm found in workspace/rpm"
+ exit 1
else
- krpm=`find "${rpmdir}" -name "${rpmpat}"`
- rpm -ihv $krpm
+ krpm=`find "${rpmdir}" -name "${rpmpat}"`
+ rpm -ihv $krpm
fi
}
## Disable clocksource verification at runtime
config_grub 'tsc' 'reliable'
-grub2-mkconfig -o /boot/grub2/grub.cfg
+sed -ie 's/saved/0/g' /etc/default/grub
install_kernel
+grub2-mkconfig -o /boot/grub2/grub.cfg