]> git.ozlabs.org Git - petitboot/blob - test/parser/test-pxe-ipappend.c
discover/grub2: Allow to separate the --id argument using a space char
[petitboot] / test / parser / test-pxe-ipappend.c
1
2 #include "parser-test.h"
3 #include "network.h"
4
5 #if 0 /* PARSER_EMBEDDED_CONFIG */
6 default linux
7
8 label linux
9 kernel ./pxe/de-ad-de-ad-be-ef.vmlinuz
10 append command line
11 ipappend 2
12 #endif
13
14 void run_test(struct parser_test *test)
15 {
16         struct discover_boot_option *opt;
17         struct discover_context *ctx;
18
19         test_read_conf_embedded_url(test, "tftp://host/dir/conf.txt");
20
21         test_set_event_source(test);
22         test_set_event_param(test->ctx->event, "pxeconffile",
23                         "tftp://host/dir/conf.txt");
24         test_set_event_device(test->ctx->event, "em1");
25
26         test_run_parser(test, "pxe");
27
28         ctx = test->ctx;
29
30         check_boot_option_count(ctx, 1);
31         opt = get_boot_option(ctx, 0);
32
33         check_name(opt, "linux");
34         check_args(opt, "command line BOOTIF=01-01-02-03-04-05-06");
35 }