]> git.ozlabs.org Git - petitboot/blob - test/parser/test-native-strings.c
lib/url: Include port in pb_url_to_string()
[petitboot] / test / parser / test-native-strings.c
1 #include "parser-test.h"
2
3 #if 0 /* PARSER_EMBEDDED_CONFIG */
4
5 name A longer name
6
7 image /some/kernel
8 initrd /some/other/initrd
9 args console=tty0 console=hvc0 debug 
10 dtb /a/dtb
11 description Contains a number of words
12
13 #endif
14
15 void run_test(struct parser_test *test)
16 {
17         struct discover_boot_option *opt;
18         struct discover_context *ctx;
19
20         test_read_conf_embedded(test, "/boot/petitboot.conf");
21
22         test_run_parser(test, "native");
23
24         ctx = test->ctx;
25
26         check_boot_option_count(ctx, 1);
27
28         opt = get_boot_option(ctx, 0);
29
30         check_name(opt, "A longer name");
31         check_resolved_local_resource(opt->boot_image, ctx->device, "/some/kernel");
32         check_args(opt, "console=tty0 console=hvc0 debug ");
33         check_resolved_local_resource(opt->initrd, ctx->device, "/some/other/initrd");
34         check_resolved_local_resource(opt->dtb, ctx->device, "/a/dtb");
35 }