]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/ccanlint.c
tlist: implement tlist_for_each_rev
[ccan] / tools / ccanlint / ccanlint.c
index 73a315722e7b2d3bbe434daab4906cfa12a372a4..4092d104160145fd6e0657187034a48da3ad845c 100644 (file)
@@ -372,6 +372,7 @@ static void print_tests(struct list_head *tests, const char *type)
 
 static char *list_tests(void *arg)
 {
+       init_tests();
        print_tests(&compulsory_tests, "Compulsory");
        print_tests(&normal_tests, "Normal");
        exit(0);
@@ -402,6 +403,7 @@ static void test_dgraph_edges(struct list_head *tests)
 
 static char *test_dependency_graph(void *arg)
 {
+       init_tests();
        puts("digraph G {");
 
        test_dgraph_vertices(&compulsory_tests, ", style=filled, fillcolor=yellow");
@@ -712,15 +714,15 @@ int main(int argc, char *argv[])
        if (verbose >= 4)
                tools_verbose = true;
 
+       /* This links back to the module's test dir. */
+       testlink = talloc_asprintf(NULL, "%s/test", temp_dir(NULL));
+
        /* Defaults to pwd. */
        if (argc == 1) {
                i = 1;
                goto got_dir;
        }
 
-       /* This links back to the module's test dir. */
-       testlink = talloc_asprintf(NULL, "%s/test", temp_dir(NULL));
-
        for (i = 1; i < argc; i++) {
                unsigned int score, total_score;
                dir = argv[i];