test/parser: Add f18 grub config test
[petitboot] / test / parser / test-grub2-f18-ppc64.c
1
2 #include "parser-test.h"
3
4 void run_test(struct parser_test *test)
5 {
6         struct discover_boot_option *opt;
7         struct discover_context *ctx;
8         int i;
9
10         test_read_conf_file(test, "grub2-f18-ppc64.conf");
11         test_run_parser(test, "grub2");
12
13         ctx = test->ctx;
14
15         check_boot_option_count(ctx, 2);
16
17         for (i = 0; i < 2; i++) {
18                 opt = get_boot_option(ctx, i);
19
20                 check_resolved_local_resource(opt->boot_image, ctx->device,
21                                 "/vmlinuz-3.6.10-4.fc18.ppc64p7");
22                 check_resolved_local_resource(opt->initrd, ctx->device,
23                                 "/initramfs-3.6.10-4.fc18.ppc64p7.img");
24
25                 check_args(opt, "root=/dev/mapper/fedora_ltcfbl8eb-root ro "
26                                 "rd.lvm.lv=fedora_ltcfbl8eb/swap rd.dm=0 "
27                                 "rd.lvm.lv=fedora_ltcfbl8eb/root  rd.md=0 "
28                                 "rd.luks=0 vconsole.keymap=us rhgb quiet");
29
30                 check_name(opt, i == 0 ?
31                                 "Fedora" :
32                                 "Fedora, with Linux 3.6.10-4.fc18.ppc64p7");
33         }
34 }