]> sjero.net Git - wget/commitdiff
[svn] Improved support for unit testing
authormtortonesi <devnull@localhost>
Wed, 2 Nov 2005 15:48:45 +0000 (07:48 -0800)
committermtortonesi <devnull@localhost>
Wed, 2 Nov 2005 15:48:45 +0000 (07:48 -0800)
ChangeLog
Makefile.in
configure.in
src/ChangeLog
src/Makefile.in
tests/Makefile.in

index f1566ebba76d0ea3a1c72e6d8c8d450453ca33af..e88d674249568e4cfc93d2e701630494412e61b6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-11-02  Mauro Tortonesi  <mauro@ferrara.linux.it>
+
+       * Makefile.in: Improved support for unit testing.
+       
+       * configure.in: Ditto.
+       
 2005-10-27  Mauro Tortonesi  <mauro@ferrara.linux.it>
 
        * Makefile.in: Added basic support for unit testing.
index 22c03d2a4fcdebceeb98b4d0534edb84077156e9..6a177453a320c183bebe00e2c948f22312ef038c 100644 (file)
@@ -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
 
index 426cd6d342add616af5d28b57bc4978d7569b692..e012e52dfc181ffdffd8c9943ce0e95aa2c3abb0 100644 (file)
@@ -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"
index 295ab622921ab9f0317ef01f2b068c0fc9380030..848ef66d5bae125c22afe702bf325169d0bd3d73 100644 (file)
@@ -1,3 +1,8 @@
+2005-11-02  Mauro Tortonesi  <mauro@ferrara.linux.it>
+
+       * Makefile.in: Removed support for unit testing (now it is in
+       tests/Makefile.in).
+
 2005-10-27  Mauro Tortonesi  <mauro@ferrara.linux.it>
 
        * Makefile.in: Added basic support for unit testing.
index 5a857ed502c6ab9fc7f7fd9a245649c6bdd9172f..e031322094e0f6ef4218cf81191452eb850c55b0 100644 (file)
@@ -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
 #
index d22838da10cd2567de54a1f4425e1e6a8ee70bea..57acc6c7b797e74a65aa8588c106dbf5a35306ed 100644 (file)
@@ -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           \