]> git.ozlabs.org Git - petitboot/blob - test/parser/test-pxe-single.c
test: add 'partition=directive' test for yaboot conf file
[petitboot] / test / parser / test-pxe-single.c
1
2 #include "parser-test.h"
3
4 #if 0 /* PARSER_EMBEDDED_CONFIG */
5 default linux
6
7 label linux
8 kernel ./pxe/de-ad-de-ad-be-ef.vmlinuz
9 append command line
10 initrd=./pxe/de-ad-de-ad-be-ef.initrd
11 #endif
12
13 void run_test(struct parser_test *test)
14 {
15         struct discover_boot_option *opt;
16         struct discover_context *ctx;
17
18         test_read_conf_embedded(test);
19         test_set_conf_source(test, "tftp://host/dir/conf.txt");
20         test_run_parser(test, "pxe");
21
22         ctx = test->ctx;
23
24         check_boot_option_count(ctx, 1);
25         opt = get_boot_option(ctx, 0);
26
27         check_name(opt, "linux");
28         check_args(opt, "command line");
29
30         check_resolved_url_resource(opt->boot_image,
31                         "tftp://host/dir/./pxe/de-ad-de-ad-be-ef.vmlinuz");
32         check_resolved_url_resource(opt->initrd,
33                         "tftp://host/dir/./pxe/de-ad-de-ad-be-ef.initrd");
34 }