Fix grep call for coverage data
authorJan-Simon Möller <jsmoeller@linuxfoundation.org>
Mon, 7 Dec 2020 17:02:40 +0000 (18:02 +0100)
committerJan-Simon Möller <jsmoeller@linuxfoundation.org>
Mon, 7 Dec 2020 17:02:40 +0000 (18:02 +0100)
Change-Id: Ibd69c1c9e34faa0226ce2de96d31713bf64e1b3d
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
jjb/common/include-agl-lava-jobs-submit.sh

index b2769c9..bbd513e 100644 (file)
@@ -185,8 +185,8 @@ if [ -s job-result.fail ];then
        handle_result
 fi
 set -x
-LINES_PERCENT=$(grep LINES_PERCENT= $JOB_LOG | sed -e 's#LINES_PERCENT=##g' | head -1)
-BRANCHES_PERCENT=$(grep BRANCHES_PERCENT= $JOB_LOG | sed -e 's#BRANCHES_PERCENT=##g' | head -1)
+LINES_PERCENT=$(grep LINES_PERCENT= $JOB_LOG | sed -e 's#LINES_PERCENT=##g' | sed -e 's#+ ##g' | head -1)
+BRANCHES_PERCENT=$(grep BRANCHES_PERCENT= $JOB_LOG | sed -e 's#BRANCHES_PERCENT=##g' | sed -e 's#+ ##g' | head -1)
 
 if [ -n $LINES_PERCENT -a -n $BRANCHES_PERCENT ] ; then
 MSG_FAIL="CI-Image-Boot-Test fail on ${MACHINE}. Coverage: Lines ${LINES_PERCENT:-0}% , Branches ${BRANCHES_PERCENT:-0}%