X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Fdepends_build_without_features.c;h=f9f582aff79aada824d8d05465634b20506fd136;hp=533f4f318ce869cfb48f83882aa713bea5457dfa;hb=dc8042b42500f79f613b1197df6cdf739615a89f;hpb=af5b1a18948345c5f9f9abf4eda3ab9fe0aa9a9f diff --git a/tools/ccanlint/tests/depends_build_without_features.c b/tools/ccanlint/tests/depends_build_without_features.c index 533f4f31..f9f582af 100644 --- a/tools/ccanlint/tests/depends_build_without_features.c +++ b/tools/ccanlint/tests/depends_build_without_features.c @@ -1,7 +1,7 @@ #include #include -#include #include +#include #include #include #include @@ -27,21 +27,25 @@ static void check_depends_built_without_features(struct manifest *m, unsigned int *timeleft, struct score *score) { + struct list_head *list; struct manifest *i; char *flags; - flags = talloc_asprintf(score, "%s %s", cflags, - REDUCE_FEATURES_FLAGS); + flags = tal_fmt(score, "%s %s", cflags, REDUCE_FEATURES_FLAGS); - list_for_each(&m->deps, i, list) { - char *errstr = build_submodule(i, flags, COMPILE_NOFEAT); + foreach_ptr(list, &m->deps, &m->test_deps) { + list_for_each(list, i, list) { + char *errstr = build_submodule(i, flags, + COMPILE_NOFEAT); - if (errstr) { - score->error = talloc_asprintf(score, + if (errstr) { + score->error = tal_fmt(score, "Dependency %s" " did not build:\n%s", - i->basename, errstr); - return; + i->modname, + errstr); + return; + } } }