]> sourceware.org Git - automake.git/commitdiff
* lib/am/check.am: Show skipped tests. Display the
authorAlexandre Duret-Lutz <adl@gnu.org>
Thu, 25 Apr 2002 07:48:32 +0000 (07:48 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Thu, 25 Apr 2002 07:48:32 +0000 (07:48 +0000)
$(PACKAGE_BUGREPORT) address on failure.

ChangeLog
TODO
lib/am/check.am
tests/Makefile.in

index a82fe451e53e511b66e20c9d2adb137260f30754..13fe95961d7c3983938fa3099ab1934413aae3e5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-04-25  Alexandre Duret-Lutz  <duret_g@epita.fr>
+
+       * lib/am/check.am: Show skipped tests.  Display the
+       $(PACKAGE_BUGREPORT) address on failure.
+
 2002-04-24  Alexandre Duret-Lutz  <duret_g@epita.fr>
 
        Fix PR automake/315:
diff --git a/TODO b/TODO
index d9740731adc808be6aa400586f3ab9f8f3857ddf..fc966667cdf8ad604080ab69e46c87f1cb172b2a 100644 (file)
--- 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
 
index ea308e0375284b0832beae4b4ffa1e1a78d06595..bdeadede021d9d9c7181c101d2a91dc643b6b966 100644 (file)
@@ -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
index 51062fdc52406d84e8e4ac1e8a8227b59d40ca38..e6b58bb46aa5bf5e8a9ede2c26b18725500e337e 100644 (file)
@@ -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
This page took 0.039612 seconds and 5 git commands to generate.