]> git.ozlabs.org Git - ccan/commitdiff
ccanlint: use valgrind options when debugging too
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 13 Dec 2010 08:15:24 +0000 (18:45 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 13 Dec 2010 08:15:24 +0000 (18:45 +1030)
If they specify valgrind options in their _info, we should use them when
running with --db-attach=yes, too.

tools/ccanlint/tests/run_tests_valgrind.c

index 21b8660af09b0dbcc2c3cdd840ffc780146c649f..b5e4eff8f881e305d2a53fb7f6b2d0682f69634a 100644 (file)
@@ -171,7 +171,9 @@ static void run_under_debugger_vg(struct manifest *m, struct score *score)
                return;
 
        first = list_top(&score->per_file_errors, struct file_error, list);
-       command = talloc_asprintf(m, "valgrind --db-attach=yes %s",
+       command = talloc_asprintf(m, "valgrind --db-attach=yes%s %s",
+                                 run_tests_vg.options ?
+                                 run_tests_vg.options : "",
                                  first->file->compiled);
        if (system(command))
                doesnt_matter();