As the whole point of mark-tested is to help improve coverage, it is
silly to rail if coverage is too low.
So make it possible to easily skip that test in the Makefile.
Signed-off-by: NeilBrown <neil@brown.name>
@for i in coverage/#*.gcda; do mv $$i coverage/$${i##*#}; done
@gcov -o coverage oceani.mdc > /dev/null 2> /dev/null
@mv *.gcov coverage ; [ -f .gcov ] && mv .gcov coverage || true
- @ awk '/NOTEST/ { next } /^ *[1-9]/ {ran+=1} /^ *###/ {skip+=1} \
+ @[ -n "$$SKIP_COVERAGE_CHECK" ] || awk '/NOTEST/ { next } /^ *[1-9]/ {ran+=1} /^ *###/ {skip+=1} \
END {printf "coverage: %6.2f%%\n", ran * 100 / (ran + skip); \
- if (ran < (ran + skip) *0.959) exit(1) }' \
+ if (ran < (ran + skip) *0.96) exit(1) }' \
coverage/oceani.mdc.gcov
@rm -f .tmp*
* )
rm coverage/*.mdc.gcov
- make SKIP_VALGRIND=1 oceani_test_suite || exit 1
+ make SKIP_VALGRIND=1 SKIP_COVERAGE_CHECK=1 oceani_test_suite || exit 1
for i in coverage/*.mdc.gcov
do
b=${i%.gcov}