Index: build/unittest.sh =================================================================== diff -u -r3b3f5c9ecc011f21754dcf053ae1ed81bb75e064 -r5387a599b1223cb0eef0caaec6b012fa9fea73d3 --- build/unittest.sh (.../unittest.sh) (revision 3b3f5c9ecc011f21754dcf053ae1ed81bb75e064) +++ build/unittest.sh (.../unittest.sh) (revision 5387a599b1223cb0eef0caaec6b012fa9fea73d3) @@ -214,11 +214,13 @@ # In the index.html, get the Coverage section (exact pattern) # Parse everything that is from .*prg0 to the tag - # In the parsed section, get everything from .*prg2"> to % and convert it to float values (i.e 42.76) + # In the parsed section, get everything from .*prg2"> to % percentage=$(cat index.html | awk '/\yCoverage\y/' | sed -e 's/.*prg0//' -e 's/<\/PRE>.*//' | \ - sed -e 's/.*prg2">//' -e 's/%.*//' | grep -o -E '[0-9]') + sed -e 's/.*prg2">//' -e 's/%.*//' | grep -o -E '[0-9]+([.][0-9]+)') + # Remove the floating point of the number + percentage=${percentage%.*} - echo "Code Coverage is $coveragePercent%" + echo "Code Coverage is $percentage%" # Check if the coverage percentage is less than 100% if [[ $percentage -lt $targetedCoverage ]] then