First automated video test (running videotest and comparing results)

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-05-02 14:39:03 +02:00
parent cd0f6eec7b
commit 5036166022
16 changed files with 1150 additions and 97 deletions

12
tests/grub_func_test.in Normal file
View file

@ -0,0 +1,12 @@
#! /bin/bash
set -e
. "@builddir@/grub-core/modinfo.sh"
out=`echo all_functional_test | @builddir@/grub-shell`
if [ "$(echo "$out" | tail -n 1)" != "ALL TESTS PASSED" ]; then
echo "Functional test failure: $out"
exit 1
fi

View file

@ -408,6 +408,8 @@ if [ x$boot = xnet ]; then
timeout -s KILL $timeout "${qemu}" ${qemuopts} -nographic ${serial_null} -serial file:/dev/stdout -monitor file:/dev/null -boot n -net "user,tftp=$netdir,bootfile=/boot/grub/${grub_modinfo_target_cpu}-${grub_modinfo_platform}/core.$netbootext" -net nic | cat | tr -d "\r" | do_trim
elif [ x$boot = xemu ]; then
grubdir="$(mktemp -d "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX")"
mkdir -p "$grubdir/fonts"
cp "@builddir@/"unicode.pf2 "$grubdir/fonts/unicode.pf2"
cp "${cfgfile}" "$grubdir/grub.cfg"
cp "${source}" "$grubdir/testcase.cfg"
@builddir@/grub-core/grub-emu -m "$device_map" -d "$grubdir" | tr -d "\r" | do_trim