Skip to content

Commit

Permalink
doxygen regression test: Tolerate only warning-free builds
Browse files Browse the repository at this point in the history
This commit simplifies the regression test for the doxygen build to
allow only 0 warnings.

Clean doxygen.runlog and doxygen.runerr for clean target 
and ignore them in .gitignore.
  • Loading branch information
tsparber committed Nov 18, 2015
1 parent 9bb3a3a commit d0e9cd1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
*.report
summary
*.summary
*.runerr
*.runlog
*.faillog
*.orig
*~
Expand Down
13 changes: 8 additions & 5 deletions regression-tests/00-doxygen/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,25 @@ doxygen:
@make -C $(DOCDIR) doxygen.log 2> doxygen.runerr > doxygen.runlog

summary: doxygen
@( doxyerr=`cat doxyerrors.cnt`; curerr=`cat $(DOCDIR)/doxygen.log | grep ": warning: " | wc -l` ; delta=`expr $$curerr - $$doxyerr`; \
if [ $$delta -lt 0 ] ; then echo "doxygen: FAIL ಠ_ಠ\nCongratulations you fixed `expr $$delta \"*\" -1 ` of doxyen's warnings (old: $$doxyerr new: $$curerr). Please adjust regression-tests/00-doxygen/doxyerrors.cnt accordingly." > summary; fi ;\
if [ $$delta -gt 0 ] ; then echo "doxygen: FAIL ಠ_ಠ\nYou increased the number of warnings caused by doxygen by $$delta (old: $$doxyerr new: $$curerr). Please fix these." > summary; fi ; \
if [ $$delta -eq 0 ] ; then echo "doxygen: OK\nDoxygen found $$doxyerr errors" > summary ; fi ; \
@( \
1> summary; \
if [ -s doxygen.runerr ] ; then \
echo "doxygen: FAIL ಠ_ಠ\nDoxygen caused some runtime warnings. Please fix these." >> summary; \
echo "Runtime warnings:" >> summary; \
cat doxygen.runerr >> summary; \
echo >> summary; \
fi ; \
if [ -s $(DOCDIR)/doxygen.log ] ; then \
echo "doxygen: FAIL ಠ_ಠ\nDoxygen caused some warnings. Please fix these." >> summary; \
echo "Warnings:" >> summary; \
cat $(DOCDIR)/doxygen.log >> summary; \
fi ; \
if [ ! -s summary ] ; then \
echo "doxygen: OK\nDoxygen found no warnings" >> summary; \
fi ; \
cat summary \
)


clean:
@rm -f summary doxygen.runlog doxygen.runerr
@make -C $(DOCDIR) clean
1 change: 0 additions & 1 deletion regression-tests/00-doxygen/doxyerrors.cnt

This file was deleted.

0 comments on commit d0e9cd1

Please sign in to comment.