]> git.ozlabs.org Git - petitboot/blob - test/parser/test-grub2-default-multiword.c
discover/powerpc: Separate ipmi bootdev handling into separate functions
[petitboot] / test / parser / test-grub2-default-multiword.c
1
2 #include "parser-test.h"
3
4 #if 0 /* PARSER_EMBEDDED_CONFIG */
5 set default="Multiple word option"
6 menuentry 'Non-defalt option' {
7         linux /vmlinux.non-default
8 }
9 menuentry 'Multiple word option' {
10         linux   /vmlinux
11 }
12 #endif
13
14 void run_test(struct parser_test *test)
15 {
16         struct discover_boot_option *opt;
17         struct discover_context *ctx;
18
19         test_read_conf_embedded(test, "/grub2/grub.cfg");
20         test_run_parser(test, "grub2");
21
22         ctx = test->ctx;
23
24         check_boot_option_count(ctx, 2);
25
26         opt = get_boot_option(ctx, 1);
27         check_name(opt, "Multiple word option");
28         check_resolved_local_resource(opt->boot_image, ctx->device, "/vmlinux");
29         check_is_default(opt);
30 }