X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=test%2Fparser%2Ftest-native-simple.c;fp=test%2Fparser%2Ftest-native-simple.c;h=f817228e5dfcfeaf3eb304d0a48f645989eda846;hp=0000000000000000000000000000000000000000;hb=646d77d8156ad72da1c24f734a029a525ba4bed9;hpb=638f16c7683db165154bbe53772c4b864f9dc90d diff --git a/test/parser/test-native-simple.c b/test/parser/test-native-simple.c new file mode 100644 index 0000000..f817228 --- /dev/null +++ b/test/parser/test-native-simple.c @@ -0,0 +1,31 @@ +#include "parser-test.h" + +#if 0 /* PARSER_EMBEDDED_CONFIG */ + +name native-option +image /vmlinuz +args console=hvc0 +initrd /initrd + +#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, "native-option"); + check_resolved_local_resource(opt->boot_image, ctx->device, "/vmlinuz"); + check_args(opt, "console=hvc0"); + check_resolved_local_resource(opt->initrd, ctx->device, "/initrd"); +}