+static char *opt_set_target(const char *arg, struct dgraph_node *all)
+{
+ struct ccanlint *t = find_test(arg);
+ if (!t)
+ return talloc_asprintf(NULL, "unknown --target %s", arg);
+
+ targeting = true;
+ dgraph_add_edge(&t->node, all);
+ return NULL;
+}
+
+static bool run_tests(struct dgraph_node *all,
+ bool summary,
+ struct manifest *m,
+ const char *prefix)
+{
+ struct run_info run;
+
+ run.quiet = summary;
+ run.m = m;
+ run.prefix = prefix;
+ run.score = run.total = 0;
+ run.pass = true;
+
+ dgraph_traverse_to(all, run_test, &run);
+
+ printf("%sTotal score: %u/%u\n", prefix, run.score, run.total);
+ return run.pass;
+}
+
+static bool add_to_all(const char *member, struct ccanlint *c,
+ struct dgraph_node *all)
+{
+ dgraph_add_edge(&c->node, all);
+ return true;
+}
+