discover: Use pxeconffile for udhcpc option name
[petitboot] / test / parser / test-pxe-initrd-in-append.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 initrd=./pxe/de-ad-de-ad-be-ef.initrd
10 #endif
11
12 void run_test(struct parser_test *test)
13 {
14         struct discover_boot_option *opt;
15         struct discover_context *ctx;
16
17         test_read_conf_embedded(test, "conf.txt");
18
19         test_set_event_source(test);
20         test_set_event_param(test->ctx->event, "pxeconffile",
21                         "tftp://host/dir/conf.txt");
22
23         test_run_parser(test, "pxe");
24
25         ctx = test->ctx;
26
27         check_boot_option_count(ctx, 1);
28         opt = get_boot_option(ctx, 0);
29
30         check_name(opt, "linux");
31         check_args(opt, "command line "
32                         "initrd=./pxe/de-ad-de-ad-be-ef.initrd");
33
34         check_resolved_url_resource(opt->boot_image,
35                         "tftp://host/dir/./pxe/de-ad-de-ad-be-ef.vmlinuz");
36         check_resolved_url_resource(opt->initrd,
37                         "tftp://host/dir/./pxe/de-ad-de-ad-be-ef.initrd");
38 }