+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:
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
.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 \
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 "*) \
;; \
esac; \
elif test $$? -ne 77; then \
+## Failure
all=`expr $$all + 1`; \
case " $(XFAIL_TESTS) " in \
*" $$tst "*) \
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"; \
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
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 \
echo "FAIL: $$tst"; \
;; \
esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ echo "SKIP: $$tst"; \
fi; \
done; \
if test "$$failed" -eq 0; then \
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