X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fccanlint%2Fccanlint.c;h=81f9614739b2242410bb7524634101ddb1e191da;hp=e3d99c79a7b72bda874466b48d427b5df2dad65c;hb=c2d60644d2c00fb32258b380bb25ce0a26b87026;hpb=678cd10db6d6b81d97f3b98ea0a54657141632ad diff --git a/tools/ccanlint/ccanlint.c b/tools/ccanlint/ccanlint.c index e3d99c79..81f96147 100644 --- a/tools/ccanlint/ccanlint.c +++ b/tools/ccanlint/ccanlint.c @@ -285,19 +285,24 @@ static void init_tests(void) } btree_delete(keys); btree_delete(names); +} - if (!verbose) - return; +static void print_test_depends(void) +{ + struct list_head *list; foreach_ptr(list, &compulsory_tests, &normal_tests) { + struct ccanlint *c; printf("\%s Tests\n", list == &compulsory_tests ? "Compulsory" : "Normal"); - if (!list_empty(&c->dependencies)) { - const struct dependent *d; - printf("These depend on us:\n"); - list_for_each(&c->dependencies, d, node) - printf("\t%s\n", d->dependent->name); + list_for_each(list, c, list) { + if (!list_empty(&c->dependencies)) { + const struct dependent *d; + printf("These depend on %s:\n", c->key); + list_for_each(&c->dependencies, d, node) + printf("\t%s\n", d->dependent->key); + } } } } @@ -640,8 +645,10 @@ int main(int argc, char *argv[]) dir[strlen(dir)-1] = '\0'; if (dir != base_dir) prefix = talloc_append_string(talloc_basename(NULL, dir), ": "); - if (verbose >= 3) + if (verbose >= 3) { compile_verbose = true; + print_test_depends(); + } if (verbose >= 4) tools_verbose = true;