Testing support

buffered-read-3-0-BETA
Stephane Bortzmeyer 24 years ago
parent 015045f9ae
commit b9b72038d1

@ -9,6 +9,11 @@ echoping_LDADD =
EXTRA_DIST = $(man_MANS)
TESTS=test-echoping-local test-echoping-remote test-echoping-icp
test: check
tests: check
## Otherwise, we depend on GNUmake, but for CVS users, not for regular
## tarball users
##AUTOMAKE_OPTIONS = no-dependencies

@ -70,6 +70,8 @@ echoping_SOURCES = echoping.c error.c readline.c writen.c util.c http.c icp.c HT
echoping_LDADD =
EXTRA_DIST = $(man_MANS)
TESTS=test-echoping-local test-echoping-remote test-echoping-icp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
@ -326,10 +328,35 @@ maintainer-clean-depend:
@-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \
< .deps/$(*F).p > .deps/$(*F).P
@-rm -f .deps/$(*F).p
check-TESTS: $(TESTS)
@failed=0; all=0; \
srcdir=$(srcdir); export srcdir; \
for tst in $(TESTS); do \
if test -f $$tst; then dir=.; \
else dir="$(srcdir)"; fi; \
if $(TESTS_ENVIRONMENT) $$dir/$$tst; then \
all=`expr $$all + 1`; \
echo "PASS: $$tst"; \
elif test $$? -ne 77; then \
all=`expr $$all + 1`; \
failed=`expr $$failed + 1`; \
echo "FAIL: $$tst"; \
fi; \
done; \
if test "$$failed" -eq 0; then \
banner="All $$all tests passed"; \
else \
banner="$$failed of $$all tests failed"; \
fi; \
dashes=`echo "$$banner" | sed s/./=/g`; \
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"; \
test "$$failed" -eq 0
info:
dvi:
check: all
$(MAKE)
$(MAKE) check-TESTS
installcheck:
install-exec: install-binPROGRAMS
@$(NORMAL_INSTALL)
@ -388,11 +415,14 @@ mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile install-man1 uninstall-man1 install-man \
uninstall-man tags mostlyclean-tags distclean-tags clean-tags \
maintainer-clean-tags distdir mostlyclean-depend distclean-depend \
clean-depend maintainer-clean-depend info dvi installcheck install-exec \
install-data install uninstall all installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
clean-depend maintainer-clean-depend check-TESTS info dvi installcheck \
install-exec install-data install uninstall all installdirs \
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
test: check
tests: check
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

@ -0,0 +1,12 @@
#!/bin/sh
echo ""
echo "Since this tests tries remote servers, a failure is not always "
echo " echoping's fault: it may be a network problem. Also, it depends on"
echo " a local ICP cache name 'cache'."
echoping -i http://www.pasteur.fr/ cache
echoping -i http://www.freenix.org/ cache

@ -0,0 +1,12 @@
#!/bin/sh
# $Id$
echo ""
echo "A message such as 'connection refused' is not always an error"
echo " you may not have an appropriate server."
echoping localhost
echoping -d localhost
echoping -c localhost
#echoping -h / localhost

@ -0,0 +1,10 @@
#!/bin/sh
echo ""
echo "Since this tests tries remote servers, a failure is not always "
echo " echoping's fault: it may be a network problem."
echoping -h / www.pasteur.fr
echoping -h / www.freenix.org
Loading…
Cancel
Save