coverage: echo overall coverage % from tail end of genhtml output
E.g. from https://kunit-review.googlesource.com/c/linux/+/2089
Overall coverage rate:
lines......: 1.5% (29 of 1893 lines)
functions..: 2.3% (5 of 221 functions)
Grab these lines and print them before the kunit.py output so they show
up in the magic build-log.txt file.
In the absence of an easy way to direct people to the html report
itself, this will make the coverage #s more accessible.
Change-Id: Iefdc4ade1d101fd4c131aa5181cf044e87ab0593
Signed-off-by: Daniel Latypov <dlatypov@google.com>
diff --git a/kunit.sh b/kunit.sh
index f3552df..52a1585 100755
--- a/kunit.sh
+++ b/kunit.sh
@@ -81,6 +81,8 @@
echo "============================="
cat "$ARTIFACTS/genhtml.log"
echo "============================="
+else
+ awk '/Overall coverage rate:/,EOF' "$ARTIFACTS/genhtml.log"
fi
echo "============================="