echo -n "printing.. "; \
echo '``````' > .tmp.code1; echo '``````' > .tmp.code2 ;\
./oceani --noexec --print --section "test: $$t" oceani-tests.mdc >> .tmp.code1; \
- ./oceani --noexec --print .tmp.code1 >> .tmp.code2 ;\
+ ./oceani --noexec --print .tmp.code1 >> .tmp.code2 || exit 1;\
if ! cmp -s .tmp.code1 .tmp.code2; then \
echo " Failed"; diff -u .tmp.code1 .tmp.code2; exit 1 ; fi ; \
echo -n "extra-newlines.. "; \
sed -e 'i\
' .tmp.code1 > .tmp.code1a; \
echo '``````' > .tmp.code2a ;\
- ./oceani --noexec --print .tmp.code1a >> .tmp.code2a;\
+ ./oceani --noexec --print .tmp.code1a >> .tmp.code2a || exit 1;\
if ! cmp -s .tmp.code1 .tmp.code2a; then \
echo " Failed"; diff -u .tmp.code1 .tmp.code2a; exit 1; fi ; \
echo -n "exec-after-print.. "; \
## test code
+ @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
+ @mv *.gcov coverage ; [ -f .gcov ] && mv .gcov coverage || true
@ awk '/NOTEST/ { next } /^ *[1-9]/ {ran+=1} /^ *###/ {skip+=1} \
END {printf "coverage: %6.2f%%\n", ran * 100 / (ran + skip); \
if (ran < (ran + skip) *0.94) exit(1) }' \
done
## other tests
-
+ @for i in coverage/#*.gcda; do mv $$i coverage/$${i##*#}; done
@gcov -o coverage scanner.c libscanner.c > /dev/null 2> /dev/null
@mv *.gcov coverage; [ -f .gcov ] && mv .gcov coverage || true
@awk '/NOTEST/ { next } /^ *[1-9]/ {ran+=1} /^ *###/ {skip+=1} \
END {printf "coverage: %6.2f%%\n", ran * 100 / (ran + skip); \
- if (ran < (ran + skip) *0.95) exit(1) }' \
+ if (ran < (ran + skip) *0.94) exit(1) }' \
coverage/scanner.mdc.gcov
@rm -f .tmp*