X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Fdepends_build_without_features.c;h=b75ebefd5e18f0f831739a4589ae0680820fc028;hb=ca6991d861a02d1da8d51f71607a4d9d8e145850;hp=533f4f318ce869cfb48f83882aa713bea5457dfa;hpb=af5b1a18948345c5f9f9abf4eda3ab9fe0aa9a9f;p=ccan diff --git a/tools/ccanlint/tests/depends_build_without_features.c b/tools/ccanlint/tests/depends_build_without_features.c index 533f4f31..b75ebefd 100644 --- a/tools/ccanlint/tests/depends_build_without_features.c +++ b/tools/ccanlint/tests/depends_build_without_features.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include @@ -27,21 +28,27 @@ 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); - 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, - "Dependency %s" - " did not build:\n%s", - i->basename, errstr); - return; + if (errstr) { + score->error = talloc_asprintf(score, + "Dependency %s" + " did not" + " build:\n%s", + i->modname, + errstr); + return; + } } }