From c13b36274abc61425338346b24d456c7b18f5bd7 Mon Sep 17 00:00:00 2001 From: Adeel Kazmi Date: Mon, 9 Nov 2020 19:07:51 +0000 Subject: [PATCH] (patch-coverage.pl) Outputs covered and total lines as well Change-Id: I3710708fa6f57b362802de4289d4c230da928741 --- automated-tests/patch-coverage.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/automated-tests/patch-coverage.pl b/automated-tests/patch-coverage.pl index 3a97dac..b3cf098 100755 --- a/automated-tests/patch-coverage.pl +++ b/automated-tests/patch-coverage.pl @@ -1105,7 +1105,7 @@ sub calc_patch_coverage_percentage my $percent = 0; if($total_exec > 0) { $percent = 100 * $total_covered_lines / $total_exec; } - return [ $total_exec, $percent ]; + return [ $total_exec, $percent, $total_covered_lines ]; } # @@ -1417,6 +1417,7 @@ elsif( ! $opt_quiet ) print RESET; } +printf("Line Coverage: %d/%d\n", $percentref->[2], $percentref->[0]); printf("Percentage of change covered: %5.2f%\n", $percent); exit($percent<90); -- 2.7.4