2 #include "parser-test.h"
4 #if 0 /* PARSER_EMBEDDED_CONFIG */
13 KERNEL /backup/vmlinuz
26 void run_test(struct parser_test *test)
28 struct discover_boot_option *opt;
29 struct discover_context *ctx;
31 test_read_conf_embedded(test, "/syslinux/syslinux.cfg");
33 test_run_parser(test, "syslinux");
37 check_boot_option_count(ctx, 4);
39 opt = get_boot_option(ctx, 3);
41 check_name(opt, "linux");
42 check_resolved_local_resource(opt->boot_image, ctx->device, "/vmlinuz");
43 check_is_default(opt);
44 check_args(opt, "console=ttyS0 console=tty0");
45 check_not_present_resource(opt->initrd);
47 opt = get_boot_option(ctx, 2);
49 check_name(opt, "backup");
50 check_resolved_local_resource(opt->boot_image, ctx->device, "/backup/vmlinuz");
51 check_args(opt, "console=ttyS0 root=/dev/sdb");
52 check_resolved_local_resource(opt->initrd, ctx->device, "/boot/initrd");
54 opt = get_boot_option(ctx, 1);
56 check_name(opt, "hyphen");
57 check_resolved_local_resource(opt->boot_image, ctx->device, "/test/vmlinuz");
59 check_not_present_resource(opt->initrd);
61 opt = get_boot_option(ctx, 0);
63 check_name(opt, "onlyglobal");
64 check_resolved_local_resource(opt->boot_image, ctx->device, "/only/vmlinuz");
65 check_args(opt, "console=ttyS0");
66 check_not_present_resource(opt->initrd);