- cmdout = run_with_timeout(m, covcmd, &ok, timeleft);
- if (!ok) {
- res->what = "Running gcov";
- res->output = talloc_steal(res, cmdout);
- return res;
- }
-
- analyze_coverage(m, res, cmdout, full_gcov);
-
- return res;
-}
-
-/* 1 point for 50%, 2 points for 75%, 3 points for 87.5%... */
-static unsigned int score_coverage(struct manifest *m, void *check_result)
-{
- struct coverage_result *res = check_result;
- float thresh;
- unsigned int i;
-
- for (i = 0, thresh = 0.5;
- i < run_coverage_tests.total_score;
- i++, thresh /= 2) {
- if (res->uncovered > thresh)
- break;
+ if (!run_command(score, timeleft, &cmdout, "%s", covcmd)) {
+ score->error = talloc_asprintf(score, "Running gcov: %s",
+ cmdout);
+ return;