]> git.ozlabs.org Git - petitboot/blob - test/parser/test-grub2-single-yocto.c
syslinux: add syslinux parser support
[petitboot] / test / parser / test-grub2-single-yocto.c
1
2 #include "parser-test.h"
3
4 /*
5  * yocto default efi-grub wks doesn't put a space between the menuentry
6  * label and the '{'
7  */
8
9 #if 0 /* PARSER_EMBEDDED_CONFIG */
10 serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
11 default=boot
12 timeout=0
13 menuentry 'boot'{
14 linux /bzImage console=ttyS0,115200n8 console=tty0
15 }
16 #endif
17
18 void run_test(struct parser_test *test)
19 {
20         struct discover_boot_option *opt;
21         struct discover_context *ctx;
22
23         test_read_conf_embedded(test, "/efi/boot/grub.cfg");
24
25         test_run_parser(test, "grub2");
26
27         ctx = test->ctx;
28
29         check_boot_option_count(ctx, 1);
30         opt = get_boot_option(ctx, 0);
31
32         check_name(opt, "boot");
33         check_resolved_local_resource(opt->boot_image, ctx->device, "/bzImage");
34         check_not_present_resource(opt->initrd);
35         check_is_default(opt);
36
37         check_args(opt, "console=ttyS0,115200n8 console=tty0");
38 }