2 #include "parser-test.h"
4 #if 0 /* PARSER_EMBEDDED_CONFIG */
13 void run_test(struct parser_test *test)
15 struct discover_boot_option *opt;
16 struct discover_context *ctx;
18 test_read_conf_embedded_url(test,
19 "tftp://host/path/to/pxelinux.cfg/"
20 "01-12-34-56-78-9a-bc");
22 test_set_event_source(test);
23 test_set_event_param(test->ctx->event, "mac", "12:34:56:78:9a:bc");
24 test_set_event_param(test->ctx->event, "pxepathprefix",
25 "tftp://host/path/to/");
27 test_run_parser(test, "pxe");
31 check_boot_option_count(ctx, 1);
32 opt = get_boot_option(ctx, 0);
34 check_name(opt, "linux");
35 check_args(opt, "command line");
37 check_resolved_url_resource(opt->boot_image,
38 "tftp://host/path/to/./kernel");
39 check_resolved_url_resource(opt->initrd,
40 "tftp://host/path/to/initrd");