]> git.ozlabs.org Git - ccan-lca-2011.git/blobdiff - tools/ccanlint/tests/run_tests_valgrind.c
ccanlint: list dependencies by key
[ccan-lca-2011.git] / tools / ccanlint / tests / run_tests_valgrind.c
index ec3a31981c21f01331fd6d1a934a95f33f452f60..d3cdb9c78c5929be4fa53300bdcc71eaaa2457a9 100644 (file)
@@ -17,6 +17,8 @@
 #include <string.h>
 #include <ctype.h>
 
+struct ccanlint run_tests_vg;
+
 /* Note: we already test safe_mode in run_tests.c */
 static const char *can_run_vg(struct manifest *m)
 {
@@ -178,20 +180,22 @@ static void run_under_debugger_vg(struct manifest *m, struct score *score)
 }
 
 struct ccanlint run_tests_vg = {
-       .key = "valgrind-tests",
+       .key = "tests_pass_valgrind",
        .name = "Module's run and api tests succeed under valgrind",
        .can_run = can_run_vg,
        .check = do_run_tests_vg,
        .handle = run_under_debugger_vg,
-       .takes_options = true
+       .takes_options = true,
+       .needs = "tests_pass"
 };
 
-REGISTER_TEST(run_tests_vg, &run_tests, NULL);
+REGISTER_TEST(run_tests_vg);
 
 struct ccanlint run_tests_vg_leak = {
-       .key = "valgrind-leaks",
+       .key = "tests_pass_valgrind_noleaks",
        .name = "Module's run and api tests leak memory",
        .check = do_leakcheck_vg,
+       .needs = "tests_pass_valgrind"
 };
 
-REGISTER_TEST(run_tests_vg_leak, &run_tests_vg, NULL);
+REGISTER_TEST(run_tests_vg_leak);