2 #include "parser-test.h"
4 #if 0 /* PARSER_EMBEDDED_CONFIG */
11 * Test that we look for a configuration file under the same prefix as
12 * the DHCP bootfile parameter, which is in a subdirectory of the TFTP root.
15 void run_test(struct parser_test *test)
17 struct discover_boot_option *opt;
18 struct discover_context *ctx;
20 test_read_conf_embedded_url(test,
21 "tftp://host/dir/pxelinux.cfg/default");
23 test_set_event_source(test);
24 test_set_event_param(test->ctx->event, "bootfile", "dir/binary");
25 test_set_event_param(test->ctx->event, "mac", "00:11:22:33:44:55");
26 test_set_event_param(test->ctx->event, "tftp", "host");
28 test_run_parser(test, "pxe");
32 check_boot_option_count(ctx, 1);
33 opt = get_boot_option(ctx, 0);
35 check_name(opt, "linux");
37 check_resolved_url_resource(opt->boot_image, "tftp://host/dir/vmlinux");
38 check_resolved_url_resource(opt->initrd, "tftp://host/dir/initrd");