]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/tests/depends_build_without_features.c
ccanlint: use traversal to trim tests we want to skip.
[ccan] / tools / ccanlint / tests / depends_build_without_features.c
index 65728fc8f1fee779de2163175a880e035b1ff714..dfa96d72c0fe3d0704a86ae244aef7c57af82b91 100644 (file)
@@ -13,7 +13,8 @@
 #include <err.h>
 #include <string.h>
 #include <ctype.h>
-#include "../compulsory_tests/build.h"
+#include "reduce_features.h"
+#include "build.h"
 
 static const char *can_build(struct manifest *m)
 {
@@ -30,7 +31,8 @@ static void check_depends_built_without_features(struct manifest *m,
        struct manifest *i;
        char *flags;
 
-       flags = talloc_asprintf(score, "%s -I.", cflags);
+       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);
@@ -53,7 +55,7 @@ struct ccanlint depends_build_without_features = {
        .name = "Module's CCAN dependencies can be found or built (reduced features)",
        .check = check_depends_built_without_features,
        .can_run = can_build,
-       .needs = "depends_exist"
+       .needs = "depends_build reduce_features"
 };
 
 REGISTER_TEST(depends_build_without_features);