]> git.ozlabs.org Git - petitboot/blob - test/parser/test-grub2-single.c
test/lib: Implement process_init change in testcases
[petitboot] / test / parser / test-grub2-single.c
1
2 #include "parser-test.h"
3
4 #if 0 /* PARSER_EMBEDDED_CONFIG */
5 menuentry 'Linux' --class test-class $menuentry_id_option 'test-id' {
6         linux   /vmlinux arg1=value1 arg2
7         initrd  /initrd
8 }
9 #endif
10
11 void run_test(struct parser_test *test)
12 {
13         struct discover_boot_option *opt;
14         struct discover_context *ctx;
15
16         test_read_conf_embedded(test);
17         test_run_parser(test, "grub2");
18
19         ctx = test->ctx;
20
21         check_boot_option_count(ctx, 1);
22         opt = get_boot_option(ctx, 0);
23
24         check_name(opt, "Linux");
25         check_resolved_local_resource(opt->boot_image, ctx->device, "/vmlinux");
26         check_resolved_local_resource(opt->initrd, ctx->device, "/initrd");
27
28         check_args(opt, "arg1=value1 arg2");
29 }