]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/tests/hash_if.c
ccanlint: exit with non-zero exit status if a test fails.
[ccan] / tools / ccanlint / tests / hash_if.c
index 3eefd1fdadf51f00e8689b8cb806513c3d8015b8..35608ef1979c28b86926f9c475c5b6dcab75ac62 100644 (file)
@@ -25,6 +25,9 @@ static void check_hash_if(struct manifest *m,
        "\n\t(#if works like #ifdef, but with gcc's -Wundef, we can detect\n"
        "\tmistyped or unknown configuration options)";
 
+       /* We don't fail ccanlint for this. */ 
+       score->pass = true;
+
        foreach_ptr(list, &m->c_files, &m->h_files,
                    &m->run_tests, &m->api_tests,
                    &m->compile_ok_tests, &m->compile_fail_tests,
@@ -60,7 +63,6 @@ static void check_hash_if(struct manifest *m,
        }
 
        if (!score->error) {
-               score->pass = true;
                score->score = score->total;
        }
 }