Add test for syslinux converter

This commit is contained in:
Vladimir Serbinenko 2015-02-16 15:58:59 +01:00
parent e29af836d0
commit d3d2e54911
14 changed files with 411 additions and 0 deletions

View file

@ -1162,6 +1162,12 @@ script = {
common = tests/grub_cmd_test.in;
};
script = {
testcase;
name = syslinux_test;
common = tests/syslinux_test.in;
};
program = {
testcase;
name = example_unit_test;

View file

@ -0,0 +1,52 @@
menu hshift 9
menu width 58
menu begin desktop
include stdmenu.cfg
menu hshift 13
menu width 49
menu label Alternative desktop environments
menu title Desktop environment menu
label mainmenu-kde
menu label ^Back..
text help
Higher level options install the GNOME desktop environment
endtext
menu exit
menu begin kde-desktop
include stdmenu.cfg
menu label ^KDE
menu title KDE desktop boot menu
text help
Select the 'K Desktop Environment' for the Desktop task
endtext
label mainmenu-kde
menu label ^Back..
menu exit
include kde/menu.cfg
menu end
menu begin lxde-desktop
include stdmenu.cfg
menu label ^LXDE
menu title LXDE desktop boot menu
text help
Select the 'Lightweight X11 Desktop Environment' for the Desktop task
endtext
label mainmenu-lxde
menu label ^Back..
menu exit
include lxde/menu.cfg
menu end
menu begin xfce-desktop
include stdmenu.cfg
menu label ^Xfce
menu title Xfce desktop boot menu
text help
Select the 'Xfce lightweight desktop environment' for the Desktop task
endtext
label mainmenu-xfce
menu label ^Back..
menu exit
include xfce/menu.cfg
menu end
menu end

View file

@ -0,0 +1,3 @@
label menu
kernel vesamenu.c32
config isolinux.cfg

View file

@ -0,0 +1,12 @@
foreground=0xFFFFFF
background=0x958490
screen-colour=0x270A1E
hidden-timeout=2
label normal=Normal
append normal=
label driverupdates=Use driver update disc
append driverupdates=debian-installer/driver-update=true
applies driverupdates=live live-install
label oem=OEM install (for manufacturers)
append oem=oem-config/enable=true
applies oem=live live-install install

View file

@ -0,0 +1,6 @@
# D-I config version 2.0
include menu.cfg
default vesamenu.c32
prompt 0
timeout 50
ui gfxboot bootlogo

View file

@ -0,0 +1,23 @@
menu hshift 13
menu width 49
menu margin 8
menu title Installer boot menu
include stdmenu.cfg
include txt.cfg
include gtk.cfg
menu begin advanced
menu title Advanced options
include stdmenu.cfg
label mainmenu
menu label ^Back..
menu exit
include adtxt.cfg
include adgtk.cfg
menu end
label help
menu label ^Help
text help
Display help screens; type 'menu' at boot prompt to return to this menu
endtext
config prompt.cfg

View file

@ -0,0 +1,3 @@
[po4a_langs] ar bn ca cs da de es eu fi fr gl hu id it ja ka ko ku lv nb nl pl pt pt_BR ru sk sv ta tr vi zh_CN zh_TW
[po4a_paths] po/help.pot $lang:po/$lang.po
[type:docbook] help.xml

View file

@ -0,0 +1,16 @@
prompt 1
display f1.txt
timeout 50
include menu.cfg
include exithelp.cfg
f1 f1.txt
f2 f2.txt
f3 f3.txt
f4 f4.txt
f5 f5.txt
f6 f6.txt
f7 f7.txt
f8 f8.txt
f9 f9.txt
f0 f10.txt

View file

@ -0,0 +1,4 @@
label rescue
menu label ^Rescue mode
kernel /install/vmlinuz
append vga=788 initrd=/install/initrd.gz rescue/enable=true -- quiet

View file

@ -0,0 +1,15 @@
menu background splash.png
menu color title * #FFFFFFFF *
menu color border * #00000000 #00000000 none
menu color sel * #ffffffff #76a1d0ff *
menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff *
menu color tabmsg * #ffffffff #00000000 *
menu color help 37;40 #ffdddd00 #00000000 none
menu vshift 12
menu rows 10
menu helpmsgrow 15
# The command line must be at least one line from the bottom.
menu cmdlinerow 16
menu timeoutrow 16
menu tabmsgrow 18
menu tabmsg Press ENTER to boot or TAB to edit a menu entry

View file

@ -0,0 +1,19 @@
default live
label live
menu label ^Try Ubuntu without installing
kernel /casper/vmlinuz
append file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash --
label live-install
menu label ^Install Ubuntu
kernel /casper/vmlinuz
append file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity initrd=/casper/initrd.lz quiet splash --
label check
menu label ^Check disc for defects
kernel /casper/vmlinuz
append boot=casper integrity-check initrd=/casper/initrd.lz quiet splash --
label memtest
menu label Test ^memory
kernel /install/mt86plus
label hd
menu label ^Boot from first hard disk
localboot 0x80

View file

@ -0,0 +1,236 @@
background_image '/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux'/'splash.png'
# D-I config version 2.0
# UNSUPPORTED command 'menu hshift 13'
# UNSUPPORTED command 'menu width 49'
# UNSUPPORTED command 'menu margin 8'
# UNSUPPORTED command 'menu title Installer boot menu'
# UNSUPPORTED command 'menu color title * #FFFFFFFF *'
# UNSUPPORTED command 'menu color border * #00000000 #00000000 none'
# UNSUPPORTED command 'menu color sel * #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color tabmsg * #ffffffff #00000000 *'
# UNSUPPORTED command 'menu color help 37;40 #ffdddd00 #00000000 none'
# UNSUPPORTED command 'menu vshift 12'
# UNSUPPORTED command 'menu rows 10'
# UNSUPPORTED command 'menu helpmsgrow 15'
# The command line must be at least one line from the bottom.
# UNSUPPORTED command 'menu cmdlinerow 16'
# UNSUPPORTED command 'menu timeoutrow 16'
# UNSUPPORTED command 'menu tabmsgrow 18'
# UNSUPPORTED command 'menu tabmsg Press ENTER to boot or TAB to edit a menu entry'
set timeout=5
default='vesamenu.c32'
menuentry 'Try Ubuntu without installing' --hotkey 't' --id 'live' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash --
initrd$linux_suffix '/'/'/casper/initrd.lz'
}
menuentry 'Install Ubuntu' --hotkey 'i' --id 'live-install' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity initrd=/casper/initrd.lz quiet splash --
initrd$linux_suffix '/'/'/casper/initrd.lz'
}
menuentry 'Check disc for defects' --hotkey 'c' --id 'check' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' boot=casper integrity-check initrd=/casper/initrd.lz quiet splash --
initrd$linux_suffix '/'/'/casper/initrd.lz'
}
menuentry 'Test memory' --hotkey 'm' --id 'memtest' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/install/mt86plus'
}
menuentry 'Boot from first hard disk' --hotkey 'b' --id 'hd' {
# File (host)//home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux/gtk.cfg not found
# UNSUPPORTED command 'menu begin advanced'
# UNSUPPORTED command 'menu title Advanced options'
# UNSUPPORTED command 'menu color title * #FFFFFFFF *'
# UNSUPPORTED command 'menu color border * #00000000 #00000000 none'
# UNSUPPORTED command 'menu color sel * #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color tabmsg * #ffffffff #00000000 *'
# UNSUPPORTED command 'menu color help 37;40 #ffdddd00 #00000000 none'
# UNSUPPORTED command 'menu vshift 12'
# UNSUPPORTED command 'menu rows 10'
# UNSUPPORTED command 'menu helpmsgrow 15'
# The command line must be at least one line from the bottom.
# UNSUPPORTED command 'menu cmdlinerow 16'
# UNSUPPORTED command 'menu timeoutrow 16'
# UNSUPPORTED command 'menu tabmsgrow 18'
# UNSUPPORTED command 'menu tabmsg Press ENTER to boot or TAB to edit a menu entry'
root=hd0;
chainloader +1;
}
menuentry 'Back..' --hotkey 'b' --id 'mainmenu' {
# UNSUPPORTED command 'menu exit'
# File (host)//home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux/adgtk.cfg not found
# UNSUPPORTED command 'menu end'
# UNSUPPORTED entry type 0
true;
}
menuentry 'Help' --hotkey 'h' --id 'help' {
# UNSUPPORTED command 'ui gfxboot bootlogo'
#'/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux'/'prompt.cfg' (host)/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux/prompt.cfg:
background_image '/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux/'/'splash.png'
# UNSUPPORTED command 'display f1.txt'
# UNSUPPORTED command 'menu hshift 13'
# UNSUPPORTED command 'menu width 49'
# UNSUPPORTED command 'menu margin 8'
# UNSUPPORTED command 'menu title Installer boot menu'
# UNSUPPORTED command 'menu color title * #FFFFFFFF *'
# UNSUPPORTED command 'menu color border * #00000000 #00000000 none'
# UNSUPPORTED command 'menu color sel * #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color tabmsg * #ffffffff #00000000 *'
# UNSUPPORTED command 'menu color help 37;40 #ffdddd00 #00000000 none'
# UNSUPPORTED command 'menu vshift 12'
# UNSUPPORTED command 'menu rows 10'
# UNSUPPORTED command 'menu helpmsgrow 15'
# The command line must be at least one line from the bottom.
# UNSUPPORTED command 'menu cmdlinerow 16'
# UNSUPPORTED command 'menu timeoutrow 16'
# UNSUPPORTED command 'menu tabmsgrow 18'
# UNSUPPORTED command 'menu tabmsg Press ENTER to boot or TAB to edit a menu entry'
set timeout=5
default='live'
menuentry 'Try Ubuntu without installing' --hotkey 't' --id 'live' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash --
initrd$linux_suffix '/'/'/casper/initrd.lz'
}
menuentry 'Install Ubuntu' --hotkey 'i' --id 'live-install' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity initrd=/casper/initrd.lz quiet splash --
initrd$linux_suffix '/'/'/casper/initrd.lz'
}
menuentry 'Check disc for defects' --hotkey 'c' --id 'check' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' boot=casper integrity-check initrd=/casper/initrd.lz quiet splash --
initrd$linux_suffix '/'/'/casper/initrd.lz'
}
menuentry 'Test memory' --hotkey 'm' --id 'memtest' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/install/mt86plus'
}
menuentry 'Boot from first hard disk' --hotkey 'b' --id 'hd' {
# File (host)//home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux//gtk.cfg not found
# UNSUPPORTED command 'menu begin advanced'
# UNSUPPORTED command 'menu title Advanced options'
# UNSUPPORTED command 'menu color title * #FFFFFFFF *'
# UNSUPPORTED command 'menu color border * #00000000 #00000000 none'
# UNSUPPORTED command 'menu color sel * #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color tabmsg * #ffffffff #00000000 *'
# UNSUPPORTED command 'menu color help 37;40 #ffdddd00 #00000000 none'
# UNSUPPORTED command 'menu vshift 12'
# UNSUPPORTED command 'menu rows 10'
# UNSUPPORTED command 'menu helpmsgrow 15'
# The command line must be at least one line from the bottom.
# UNSUPPORTED command 'menu cmdlinerow 16'
# UNSUPPORTED command 'menu timeoutrow 16'
# UNSUPPORTED command 'menu tabmsgrow 18'
# UNSUPPORTED command 'menu tabmsg Press ENTER to boot or TAB to edit a menu entry'
root=hd0;
chainloader +1;
}
menuentry 'Back..' --hotkey 'b' --id 'mainmenu' {
# UNSUPPORTED command 'menu exit'
# File (host)//home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux//adgtk.cfg not found
# UNSUPPORTED command 'menu end'
# UNSUPPORTED entry type 0
true;
}
menuentry 'Help' --hotkey 'h' --id 'help' {
#'/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux/'/'prompt.cfg' (host)/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux/prompt.cfg:
syslinux_configfile -r '/'/'/' -c '/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux/'/'' '/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux/'/'prompt.cfg'
}
menuentry 'menu' --id 'menu' {
# UNSUPPORTED command 'f1 f1.txt'
# UNSUPPORTED command 'f2 f2.txt'
# UNSUPPORTED command 'f3 f3.txt'
# UNSUPPORTED command 'f4 f4.txt'
# UNSUPPORTED command 'f5 f5.txt'
# UNSUPPORTED command 'f6 f6.txt'
# UNSUPPORTED command 'f7 f7.txt'
# UNSUPPORTED command 'f8 f8.txt'
# UNSUPPORTED command 'f9 f9.txt'
# UNSUPPORTED command 'f0 f10.txt'
#'/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux/'/'isolinux.cfg' (host)/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux/isolinux.cfg:
background_image '/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux//'/'splash.png'
# D-I config version 2.0
# UNSUPPORTED command 'menu hshift 13'
# UNSUPPORTED command 'menu width 49'
# UNSUPPORTED command 'menu margin 8'
# UNSUPPORTED command 'menu title Installer boot menu'
# UNSUPPORTED command 'menu color title * #FFFFFFFF *'
# UNSUPPORTED command 'menu color border * #00000000 #00000000 none'
# UNSUPPORTED command 'menu color sel * #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color tabmsg * #ffffffff #00000000 *'
# UNSUPPORTED command 'menu color help 37;40 #ffdddd00 #00000000 none'
# UNSUPPORTED command 'menu vshift 12'
# UNSUPPORTED command 'menu rows 10'
# UNSUPPORTED command 'menu helpmsgrow 15'
# The command line must be at least one line from the bottom.
# UNSUPPORTED command 'menu cmdlinerow 16'
# UNSUPPORTED command 'menu timeoutrow 16'
# UNSUPPORTED command 'menu tabmsgrow 18'
# UNSUPPORTED command 'menu tabmsg Press ENTER to boot or TAB to edit a menu entry'
set timeout=5
default='vesamenu.c32'
menuentry 'Try Ubuntu without installing' --hotkey 't' --id 'live' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' file=/cdrom/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash --
initrd$linux_suffix '/'/'/casper/initrd.lz'
}
menuentry 'Install Ubuntu' --hotkey 'i' --id 'live-install' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity initrd=/casper/initrd.lz quiet splash --
initrd$linux_suffix '/'/'/casper/initrd.lz'
}
menuentry 'Check disc for defects' --hotkey 'c' --id 'check' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/casper/vmlinuz' boot=casper integrity-check initrd=/casper/initrd.lz quiet splash --
initrd$linux_suffix '/'/'/casper/initrd.lz'
}
menuentry 'Test memory' --hotkey 'm' --id 'memtest' {
if test x$grub_platform = xpc; then linux_suffix=16; else linux_suffix= ; fi
linux$linux_suffix '/'/'/install/mt86plus'
}
menuentry 'Boot from first hard disk' --hotkey 'b' --id 'hd' {
# File (host)//home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux///gtk.cfg not found
# UNSUPPORTED command 'menu begin advanced'
# UNSUPPORTED command 'menu title Advanced options'
# UNSUPPORTED command 'menu color title * #FFFFFFFF *'
# UNSUPPORTED command 'menu color border * #00000000 #00000000 none'
# UNSUPPORTED command 'menu color sel * #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color hotsel 1;7;37;40 #ffffffff #76a1d0ff *'
# UNSUPPORTED command 'menu color tabmsg * #ffffffff #00000000 *'
# UNSUPPORTED command 'menu color help 37;40 #ffdddd00 #00000000 none'
# UNSUPPORTED command 'menu vshift 12'
# UNSUPPORTED command 'menu rows 10'
# UNSUPPORTED command 'menu helpmsgrow 15'
# The command line must be at least one line from the bottom.
# UNSUPPORTED command 'menu cmdlinerow 16'
# UNSUPPORTED command 'menu timeoutrow 16'
# UNSUPPORTED command 'menu tabmsgrow 18'
# UNSUPPORTED command 'menu tabmsg Press ENTER to boot or TAB to edit a menu entry'
root=hd0;
chainloader +1;
}
menuentry 'Back..' --hotkey 'b' --id 'mainmenu' {
# UNSUPPORTED command 'menu exit'
# File (host)//home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux///adgtk.cfg not found
# UNSUPPORTED command 'menu end'
# UNSUPPORTED entry type 0
true;
}
menuentry 'Help' --hotkey 'h' --id 'help' {
# UNSUPPORTED command 'ui gfxboot bootlogo'
#'/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux//'/'prompt.cfg' (host)/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux/prompt.cfg:
syslinux_configfile -r '/'/'/' -c '/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux//'/'' '/home/phcoder/grub2/git/tests/syslinux/ubuntu10.04/isolinux//'/'prompt.cfg'
}
}
}

16
tests/syslinux_test.in Normal file
View file

@ -0,0 +1,16 @@
#!/bin/sh
set -e
outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 1
"@builddir@/grub-syslinux2cfg" -r "@srcdir@/tests/syslinux/ubuntu10.04" "@srcdir@/tests/syslinux/ubuntu10.04/isolinux/isolinux.cfg" -o "$outfile"
echo "$outfile"
if ! diff -u "$outfile" "@srcdir@/tests/syslinux/ubuntu10.04_grub.cfg"; then
echo "Mismatch in ubuntu10.04"
exit 1;
fi
exit 0