From a7c7adecafd1902475ae91000dd097a1ce50970a Mon Sep 17 00:00:00 2001 From: Kirill Zaitsev Date: Fri, 1 Jul 2016 17:37:45 +0300 Subject: [PATCH] Improve cover job output Change-Id: I88aa89063e4e63731b0ea0e70349f915c1b7ce51 --- tools/cover.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/cover.sh b/tools/cover.sh index cc1bdb1d..c5823a4a 100755 --- a/tools/cover.sh +++ b/tools/cover.sh @@ -42,12 +42,20 @@ find . -type f -name "*.pyc" -delete && python setup.py testr --coverage --testr coverage report > $current_report current_missing=$(awk 'END { print $3 }' $current_report) +baseline_percentage=$(awk 'END { print $6 }' $baseline_report) +current_percentage=$(awk 'END { print $6 }' $current_report) # Show coverage details allowed_missing=$((baseline_missing+ALLOWED_EXTRA_MISSING)) +echo "Baseline report: $(cat ${baseline_report})" +echo "Proposed change report: $(cat ${current_report})" +echo "" +echo "" echo "Allowed to introduce missing lines : ${ALLOWED_EXTRA_MISSING}" echo "Missing lines in master : ${baseline_missing}" echo "Missing lines in proposed change : ${current_missing}" +echo "Current percentage : ${baseline_percentage}" +echo "Proposed change percentage : ${current_percentage}" if [ $allowed_missing -gt $current_missing ]; then