From: Alexandre Duret-Lutz Date: Thu, 25 Apr 2002 07:48:34 +0000 (+0000) Subject: * lib/am/check.am: Show skipped tests. Display the X-Git-Tag: Release-1-6-1b~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aed7c58fca872426d39a0cb2239548043b681d0f;p=thirdparty%2Fautomake.git * lib/am/check.am: Show skipped tests. Display the $(PACKAGE_BUGREPORT) address on failure. --- diff --git a/ChangeLog b/ChangeLog index a82fe451e..13fe95961 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-04-25 Alexandre Duret-Lutz + + * lib/am/check.am: Show skipped tests. Display the + $(PACKAGE_BUGREPORT) address on failure. + 2002-04-24 Alexandre Duret-Lutz Fix PR automake/315: diff --git a/TODO b/TODO index d9740731a..fc966667c 100644 --- a/TODO +++ b/TODO @@ -26,8 +26,6 @@ investigate problems with conditionally defined libraries add an error if the user makefile.am violates our namespace rules -have 'make check' print tests which are skipped - we need a document describing automake from the end user's point of view eg describe INSTALL_HEADER there, among other things diff --git a/lib/am/check.am b/lib/am/check.am index ea308e037..bdeadede0 100644 --- a/lib/am/check.am +++ b/lib/am/check.am @@ -19,7 +19,7 @@ .PHONY: check-TESTS check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; \ + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list='$(TESTS)'; \ if test -n "$$list"; then \ @@ -30,6 +30,7 @@ check-TESTS: $(TESTS) elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ +## Success all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *" $$tst "*) \ @@ -42,6 +43,7 @@ check-TESTS: $(TESTS) ;; \ esac; \ elif test $$? -ne 77; then \ +## Failure all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *" $$tst "*) \ @@ -53,8 +55,13 @@ check-TESTS: $(TESTS) echo "FAIL: $$tst"; \ ;; \ esac; \ + else \ +## Skipped + skip=`expr $$skip + 1`; \ + echo "SKIP: $$tst"; \ fi; \ done; \ +## Prepare the banner if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="All $$all tests passed"; \ @@ -68,9 +75,25 @@ check-TESTS: $(TESTS) banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ fi; \ fi; \ - dashes=`echo "$$banner" | sed s/./=/g`; \ +## DASHES should contain the largest line of the banner. + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + skipped="($$skip tests were not run)"; \ + test `echo "$$skipped" | wc -c` -gt `echo "$$banner" | wc -c` && \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -gt `echo "$$banner" | wc -c` && \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ echo "$$dashes"; \ echo "$$banner"; \ + test -n "$$skipped" && echo "$$skipped"; \ + test -n "$$report" && echo "$$report"; \ echo "$$dashes"; \ test "$$failed" -eq 0; \ else :; fi diff --git a/tests/Makefile.in b/tests/Makefile.in index 51062fdc5..e6b58bb46 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -480,7 +480,7 @@ TAGS: check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; \ + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list='$(TESTS)'; \ if test -n "$$list"; then \ @@ -512,6 +512,9 @@ check-TESTS: $(TESTS) echo "FAIL: $$tst"; \ ;; \ esac; \ + else \ + skip=`expr $$skip + 1`; \ + echo "SKIP: $$tst"; \ fi; \ done; \ if test "$$failed" -eq 0; then \ @@ -527,9 +530,24 @@ check-TESTS: $(TESTS) banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ fi; \ fi; \ - dashes=`echo "$$banner" | sed s/./=/g`; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + skipped="($$skip tests were not run)"; \ + test `echo "$$skipped" | wc -c` -gt `echo "$$banner" | wc -c` && \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -gt `echo "$$banner" | wc -c` && \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ echo "$$dashes"; \ echo "$$banner"; \ + test -n "$$skipped" && echo "$$skipped"; \ + test -n "$$report" && echo "$$report"; \ echo "$$dashes"; \ test "$$failed" -eq 0; \ else :; fi