X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Ftests_coverage.c;h=67829e96918f8fe4e1509ac8830fd27a83e2b9cb;hp=ec9774dae53650778aaef9c02688e0b01e02c26e;hb=37e247dbcb57f4b2effd44b37b96dc679ee525d0;hpb=1f45ec04761cd99011445c6d41cd64a3951f77e0 diff --git a/tools/ccanlint/tests/tests_coverage.c b/tools/ccanlint/tests/tests_coverage.c index ec9774da..67829e96 100644 --- a/tools/ccanlint/tests/tests_coverage.c +++ b/tools/ccanlint/tests/tests_coverage.c @@ -54,7 +54,7 @@ static unsigned int score_coverage(float covered, unsigned total) static void analyze_coverage(struct manifest *m, bool full_gcov, const char *output, struct score *score) { - char **lines = strsplit(score, output, "\n", NULL); + char **lines = strsplit(score, output, "\n"); float covered_lines = 0.0; unsigned int i, total_lines = 0; bool lines_matter = false; @@ -110,6 +110,10 @@ static void analyze_coverage(struct manifest *m, bool full_gcov, score->pass = true; + if (verbose > 1) + printf("%u of %u lines covered\n", + (unsigned)covered_lines, total_lines); + /* Nothing covered? We can't tell if there's a source file which * was never executed, or there really is no code to execute, so * assume the latter: this test deserves no score. */