gcc gave a warning:
tools/ccanlint/ccanlint.c:230:19: error: ācā may be used uninitialized in this function
Which indicated that test dependency printing was broken: we need to
loop through the tests! Also, we haven't parsed options yet, so
verbose is never true: move it to later and make it depend on -vvv.
}
btree_delete(keys);
btree_delete(names);
}
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) {
foreach_ptr(list, &compulsory_tests, &normal_tests) {
printf("\%s Tests\n",
list == &compulsory_tests ? "Compulsory" : "Normal");
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);
+ }
dir[strlen(dir)-1] = '\0';
if (dir != base_dir)
prefix = talloc_append_string(talloc_basename(NULL, dir), ": ");
dir[strlen(dir)-1] = '\0';
if (dir != base_dir)
prefix = talloc_append_string(talloc_basename(NULL, dir), ": ");
+ print_test_depends();
+ }
if (verbose >= 4)
tools_verbose = true;
if (verbose >= 4)
tools_verbose = true;