From b285d8070b072f2ccab1b1ff53cd8e41e4d95e7f Mon Sep 17 00:00:00 2001 From: mtortonesi Date: Wed, 2 Nov 2005 07:48:45 -0800 Subject: [PATCH] [svn] Improved support for unit testing --- ChangeLog | 6 ++++++ Makefile.in | 11 +++-------- configure.in | 2 +- src/ChangeLog | 5 +++++ src/Makefile.in | 20 -------------------- tests/Makefile.in | 8 ++++---- 6 files changed, 19 insertions(+), 33 deletions(-) diff --git a/ChangeLog b/ChangeLog index f1566ebb..e88d6742 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-11-02 Mauro Tortonesi + + * Makefile.in: Improved support for unit testing. + + * configure.in: Ditto. + 2005-10-27 Mauro Tortonesi * Makefile.in: Added basic support for unit testing. diff --git a/Makefile.in b/Makefile.in index 22c03d2a..6a177453 100644 --- a/Makefile.in +++ b/Makefile.in @@ -80,19 +80,14 @@ CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \ prefix='$(prefix)' exec_prefix='$(exec_prefix)' bindir='$(bindir)' \ infodir='$(infodir)' mandir='$(mandir)' manext='$(manext)' -TESTDEFS = CC='$(CC)' CPPFLAGS='$(CPPFLAGS) -DTESTING' DEFS='$(DEFS)' \ -CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' LIBS='$(LIBS)' \ -prefix='$(prefix)' exec_prefix='$(exec_prefix)' bindir='$(bindir)' \ -infodir='$(infodir)' mandir='$(mandir)' manext='$(manext)' - # subdirectories in the distribution -SUBDIRS = src doc po util windows +SUBDIRS = src doc po tests util windows # default target all: src/config.h Makefile $(SUBDIRS) -test: src/config.h Makefile - cd src && $(MAKE) $(TESTDEFS) clean && $(MAKE) $(TESTDEFS) test$(exeext) +unittest: src/config.h Makefile + cd tests && $(MAKE) $(TESTDEFS) $@ check: all diff --git a/configure.in b/configure.in index 426cd6d3..e012e52d 100644 --- a/configure.in +++ b/configure.in @@ -476,7 +476,7 @@ dnl dnl Create output dnl AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile util/Makefile - po/Makefile.in windows/Makefile]) + po/Makefile.in tests/Makefile windows/Makefile]) AC_CONFIG_HEADERS([src/config.h]) AH_BOTTOM([ #include "config-post.h" diff --git a/src/ChangeLog b/src/ChangeLog index 295ab622..848ef66d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-11-02 Mauro Tortonesi + + * Makefile.in: Removed support for unit testing (now it is in + tests/Makefile.in). + 2005-10-27 Mauro Tortonesi * Makefile.in: Added basic support for unit testing. diff --git a/src/Makefile.in b/src/Makefile.in index 5a857ed5..e0313220 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -102,26 +102,6 @@ $(OBJ): config-post.h config.h connect.h convert.h cookies.h ftp.h \ progress.h ptimer.h recur.h res.h retr.h safe-ctype.h ssl.h \ sysdep.h url.h utils.h wget.h xmalloc.h -# -# Dependencies for test binary -# - -TESTOBJ = $(ALLOCA) cmpt.o connect.o convert.o cookies.o \ - ftp.o ftp-basic.o ftp-ls.o $(OPIE_OBJ) $(GETOPT_OBJ) hash.o \ - host.o html-parse.o html-url.o http.o $(NTLM_OBJ) init.o \ - log.o main.o $(MD5_OBJ) netrc.o progress.o ptimer.o recur.o \ - res.o retr.o safe-ctype.o snprintf.o $(SSL_OBJ) test.o \ - url.o utils.o version.o xmalloc.o - -$(TESTOBJ): config-post.h config.h connect.h convert.h cookies.h ftp.h \ - gen-md5.h getopt.h gnu-md5.h hash.h host.h html-parse.h \ - http-ntlm.h init.h log.h mswindows.h netrc.h options.h \ - progress.h ptimer.h recur.h res.h retr.h safe-ctype.h ssl.h \ - sysdep.h test.h url.h utils.h wget.h xmalloc.h - -test$(exeext): $(TESTOBJ) - $(LINK) $(TESTOBJ) $(LIBS) - # # Dependencies for installing # diff --git a/tests/Makefile.in b/tests/Makefile.in index d22838da..57acc6c7 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -81,10 +81,10 @@ unittest: test$(exeext) # Dependencies for test binary # -TESTOBJ = $(ALLOCA) ccache.o cmpt.o connect.o convert.o cookies.o \ +TESTOBJ = $(ALLOCA) cmpt.o connect.o convert.o cookies.o \ ftp.o ftp-basic.o ftp-ls.o $(OPIE_OBJ) $(GETOPT_OBJ) hash.o \ host.o html-parse.o html-url.o http.o $(NTLM_OBJ) init.o \ - log.o main.o $(MD5_OBJ) netrc.o progress.o protocol.o \ + log.o main.o $(MD5_OBJ) netrc.o progress.o \ ptimer.o recur.o res.o retr.o safe-ctype.o snprintf.o \ $(SSL_OBJ) test.o url.o utils.o version.o xmalloc.o @@ -94,13 +94,13 @@ TESTOBJ = $(ALLOCA) ccache.o cmpt.o connect.o convert.o cookies.o \ # time, and it's a lot safer than attempting to get all the # dependencies right. -HEADERS = ../src/ccache.h ../src/config-post.h ../src/config.h \ +HEADERS = ../src/config-post.h ../src/config.h \ ../src/connect.h ../src/convert.h ../src/cookies.h \ ../src/ftp.h ../src/gen-md5.h ../src/getopt.h \ ../src/gnu-md5.h ../src/hash.h ../src/host.h \ ../src/html-parse.h ../src/http-ntlm.h ../src/init.h \ ../src/log.h ../src/mswindows.h ../src/netrc.h \ - ../src/options.h ../src/progress.h ../src/protocol.h \ + ../src/options.h ../src/progress.h \ ../src/ptimer.h ../src/recur.h ../src/res.h \ ../src/retr.h ../src/safe-ctype.h ../src/ssl.h \ ../src/sysdep.h ../src/test.h ../src/url.h \ -- 2.39.2