Commit 3460418c authored by Rusty Russell's avatar Rusty Russell

Don't run dependent tests if one fails.

parent b0f7eb29
......@@ -100,6 +100,9 @@ static bool run_test(struct ccanlint *i,
else
this_score = 0;
list_del(&i->list);
list_add_tail(&finished_tests, &i->list);
*score += this_score;
if (summary) {
printf("%s FAILED (%u/%u)\n",
......@@ -107,17 +110,22 @@ static bool run_test(struct ccanlint *i,
if (verbose)
indent_print(i->describe(m, result));
list_del(&i->list);
list_add_tail(&finished_tests, &i->list);
return false;
}
} else {
printf("%s\n", i->describe(m, result));
if (i->handle)
i->handle(m, result);
list_del(&i->list);
list_add_tail(&finished_tests, &i->list);
}
/* Skip any tests which depend on this one. */
list_for_each(&i->dependencies, d, node) {
list_del(&d->dependent->list);
list_add(&finished_tests, &d->dependent->list);
if (verbose)
printf(" -> skipping %s\n", d->dependent->name);
*total_score += d->dependent->total_score;
}
return false;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment