summaryrefslogtreecommitdiffstats
path: root/test/parser/test-native-strings.c
blob: 33d242af5ee786abbac7df3aec3d6b7b8ab0d444 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include "parser-test.h"

#if 0 /* PARSER_EMBEDDED_CONFIG */

name A longer name

image /some/kernel
initrd /some/other/initrd
args console=tty0 console=hvc0 debug 
dtb /a/dtb
description Contains a number of words

#endif

void run_test(struct parser_test *test)
{
	struct discover_boot_option *opt;
	struct discover_context *ctx;

	test_read_conf_embedded(test, "/boot/petitboot.conf");

	test_run_parser(test, "native");

	ctx = test->ctx;

	check_boot_option_count(ctx, 1);

	opt = get_boot_option(ctx, 0);

	check_name(opt, "A longer name");
	check_resolved_local_resource(opt->boot_image, ctx->device, "/some/kernel");
	check_args(opt, "console=tty0 console=hvc0 debug ");
	check_resolved_local_resource(opt->initrd, ctx->device, "/some/other/initrd");
	check_resolved_local_resource(opt->dtb, ctx->device, "/a/dtb");
}
OpenPOWER on IntegriCloud