X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fccanlint%2Fccanlint.c;h=4092d104160145fd6e0657187034a48da3ad845c;hb=6a906358d922800c7358c5c46c34bf4a5e6863ad;hp=73a315722e7b2d3bbe434daab4906cfa12a372a4;hpb=758ab1f402b4af3cccac09548b709deca17ef930;p=ccan diff --git a/tools/ccanlint/ccanlint.c b/tools/ccanlint/ccanlint.c index 73a31572..4092d104 100644 --- a/tools/ccanlint/ccanlint.c +++ b/tools/ccanlint/ccanlint.c @@ -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];