merge boottest into newreloc

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-04-27 13:34:07 +02:00
commit 6c3d9c2845
95 changed files with 4206 additions and 3007 deletions

View file

@ -0,0 +1,5 @@
#! /bin/sh -e
@builddir@/grub-script-check << EOF
echo "\\\$"
EOF

View file

@ -55,7 +55,7 @@ Report bugs to <bug-grub@gnu.org>.
EOF
}
boot=bios-hd
boot=hd
qemu=qemu-system-i386
# Check the arguments.
@ -80,9 +80,9 @@ for option in "$@"; do
qemuopts="$qemuopts $qs" ;;
--boot=*)
dev=`echo "$option" | sed -e 's/--boot=//'`
if [ "$dev" = "bios-fd" ] ; then boot=bios-fd;
elif [ "$dev" = "bios-hd" ] ; then boot=bios-hd;
elif [ "$dev" = "bios-cd" ] ; then boot=bios-cd;
if [ "$dev" = "fd" ] ; then boot=fd;
elif [ "$dev" = "hd" ] ; then boot=hd;
elif [ "$dev" = "cd" ] ; then boot=cd;
else
echo "Unrecognized boot method \`$dev'" 1>&2
usage
@ -129,26 +129,26 @@ source /boot/grub/testcase.cfg
halt
EOF
if [ x$boot = xbios-hd ] || [ x$boot = xbios-fd ] || [ x$boot = xbios-cd ]; then
isofile=`mktemp`
grub-mkrescue --output=${isofile} --override-directory=${builddir} \
/boot/grub/grub.cfg=${cfgfile} /boot/grub/testcase.cfg=${source} \
${files} >/dev/null 2>&1
if [ x$boot = xbios-hd ]; then
device=hda
bootdev=c
fi
if [ x$boot = xbios-cd ]; then
device=cdrom
bootdev=d
fi
if [ x$boot = xbios-fd ]; then
device=fda
bootdev=a
fi
${qemu} ${qemuopts} -nographic -serial file:/dev/stdout -monitor file:/dev/null -${device} ${isofile} -boot ${bootdev} | tr -d "\r"
rm -f ${isofile}
isofile=`mktemp`
grub-mkrescue --output=${isofile} --override-directory=${builddir} \
/boot/grub/grub.cfg=${cfgfile} /boot/grub/testcase.cfg=${source} \
${files} >/dev/null 2>&1
if [ x$boot = xhd ]; then
device=hda
bootdev=c
fi
if [ x$boot = xcd ]; then
device=cdrom
bootdev=d
fi
if [ x$boot = xfd ]; then
device=fda
bootdev=a
fi
echo ${qemu} ${qemuopts} -nographic -serial file:/dev/stdout -monitor file:/dev/null -${device} ${isofile} -boot ${bootdev}
#${qemu} ${qemuopts} -nographic -serial file:/dev/stdout -monitor file:/dev/null -${device} ${isofile} -boot ${bootdev} | tr -d "\r"
#rm -f ${isofile}
rm -f ${tmpfile} ${cfgfile}
exit 0