X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Finfo_ported.c;h=80e347c73343df3983a4513a4fe1b73b56ed59b4;hp=f58f2f3498e3665125568f81a33b319017d2f1f7;hb=HEAD;hpb=0d712535273f2ff2430ee68120e6237cf2ee3869 diff --git a/tools/ccanlint/tests/info_ported.c b/tools/ccanlint/tests/info_ported.c index f58f2f34..80e347c7 100644 --- a/tools/ccanlint/tests/info_ported.c +++ b/tools/ccanlint/tests/info_ported.c @@ -15,17 +15,21 @@ static const char *can_build(struct manifest *m) { + char *msg; + /* FIXME: In safe mode, we'd need complex guesstiparsing. */ if (safe_mode) return NULL; - if (get_ported(m, m->dir, true, get_or_compile_info)) + msg = get_ported(m, m->dir, true, get_or_compile_info); + if (!msg) return NULL; - return "'_info ported' says not supported"; + return tal_fmt(m, "'_info ported' says '%s'", msg); } -static void check_info_ported(struct manifest *m, - unsigned int *timeleft, struct score *score) +static void check_info_ported(struct manifest *m UNNEEDED, + unsigned int *timeleft UNNEEDED, + struct score *score) { score->pass = true; score->score = 1; @@ -36,7 +40,7 @@ struct ccanlint info_ported = { .can_run = can_build, .name = "_info indicates support for this platform", .check = check_info_ported, - .needs = "info_exists" + .needs = "info_compiles" }; REGISTER_TEST(info_ported);