]> git.ozlabs.org Git - petitboot/blob - test/parser/test-unresolved-remove.c
discover/paths: Add stdout callback parameter for load_url_async()
[petitboot] / test / parser / test-unresolved-remove.c
1
2 #include "parser-test.h"
3
4 #if 0 /* PARSER_EMBEDDED_CONFIG */
5 menuentry 'Linux' {
6         search --set=root ec50d321-aab1-4335-8a87-aa8fadd80a09
7         linux   /vmlinux
8 }
9 #endif
10
11 void run_test(struct parser_test *test)
12 {
13         struct discover_boot_option *opt;
14         struct discover_context *ctx;
15         struct discover_device *dev;
16
17         test_read_conf_embedded(test, "/grub.cfg");
18
19         test_run_parser(test, "grub2");
20
21         ctx = test->ctx;
22
23         check_boot_option_count(ctx, 1);
24         opt = get_boot_option(ctx, 0);
25         check_name(opt, "Linux");
26         check_unresolved_resource(opt->boot_image);
27
28         test_remove_device(test, test->ctx->device);
29
30         dev = test_create_device(test, "external");
31         dev->uuid = "ec50d321-aab1-4335-8a87-aa8fadd80a09";
32         test_hotplug_device(test, dev);
33
34         check_boot_option_count(ctx, 0);
35 }