]> git.ozlabs.org Git - petitboot/blob - test/parser/test-yaboot-root-global.c
discover: Add test_data member to struct discover_context
[petitboot] / test / parser / test-yaboot-root-global.c
1
2
3 #include "parser-test.h"
4
5 #if 0 /* PARSER_EMBEDDED_CONFIG */
6 default=linux
7 root=/dev/sda1
8
9 image=/vmlinux
10         label=linux
11         initrd=/initrd
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);
20         test_run_parser(test, "yaboot");
21
22         ctx = test->ctx;
23
24         check_boot_option_count(ctx, 1);
25
26         opt = get_boot_option(ctx, 0);
27
28         check_name(opt, "linux");
29         check_resolved_local_resource(opt->boot_image, ctx->device, "/vmlinux");
30         check_resolved_local_resource(opt->initrd, ctx->device, "/initrd");
31 }