]> git.ozlabs.org Git - petitboot/blob - test/parser/test-yaboot-root-override.c
ui/ncurses: Allow boot editor sysinfo updates
[petitboot] / test / parser / test-yaboot-root-override.c
1
2 #include "parser-test.h"
3
4 #if 0 /* PARSER_EMBEDDED_CONFIG */
5 default=linux
6 root=/dev/sda1
7
8 image=/vmlinux
9         label=linux 1
10
11 image=/vmlinux
12         label=linux 2
13         root=/dev/sda2
14 #endif
15
16 void run_test(struct parser_test *test)
17 {
18         struct discover_boot_option *opt;
19         struct discover_context *ctx;
20
21         test_read_conf_embedded(test, "/etc/yaboot.conf");
22
23         test_run_parser(test, "yaboot");
24
25         ctx = test->ctx;
26
27         check_boot_option_count(ctx, 2);
28
29         opt = get_boot_option(ctx, 0);
30         check_name(opt, "linux 1");
31         check_args(opt, "root=/dev/sda1");
32
33         opt = get_boot_option(ctx, 1);
34         check_name(opt, "linux 2");
35         check_args(opt, "root=/dev/sda2");
36 }