]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/tests/tests_compile.c
ccanlint: fix dependencies on tests_pass_without_features.
[ccan] / tools / ccanlint / tests / tests_compile.c
index 9e6d5dc7c52ea78055484424da9757a83e6fe8da..6c0f9d34274195855fafc4715972a717f37b48bd 100644 (file)
@@ -131,11 +131,11 @@ static void compile_tests(struct manifest *m, bool keep,
                                         "Compiled successfully with -DFAIL?");
                        return;
                }
+               score->total++;
        }
 
        score->pass = true;
-       score->total = 2;
-       score->score = 1 + !warnings;
+       score->score = score->total - warnings;
 }
 
 static void do_compile_tests(struct manifest *m,
@@ -167,7 +167,7 @@ static void do_compile_tests_without_features(struct manifest *m,
                                              unsigned int *timeleft,
                                              struct score *score)
 {
-       return compile_tests(m, keep, score, "-I. ");
+       compile_tests(m, keep, score, "-I. ");
 }
 
 struct ccanlint tests_compile_without_features = {
@@ -175,6 +175,6 @@ struct ccanlint tests_compile_without_features = {
        .name = "Module tests compile (without features)",
        .check = do_compile_tests_without_features,
        .can_run = features_reduced,
-       .needs = "reduce_features"
+       .needs = "tests_compile reduce_features"
 };
 REGISTER_TEST(tests_compile_without_features);