From 5a97871f5d737c5c616b239b9bc0a346177c9be3 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Fri, 7 May 2010 13:10:09 +0200 Subject: [PATCH] Fix unit tests build in a VPATH. --- src/ChangeLog | 2 ++ src/Makefile.am | 2 +- tests/ChangeLog | 65 +++++++++++++++++++++++++---------------------- tests/Makefile.am | 5 ++-- 4 files changed, 41 insertions(+), 33 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 73658393..b0871e7d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2010-05-07 Giuseppe Scrivano + * Makefile.am (libunittest_a_CPPFLAGS): Add -I$(top_builddir)/lib. + * mswindows.h: Always include and . Do not include . [! INHIBIT_WRAP]: Remove macro's socket, bind, connect, accept, recv, diff --git a/src/Makefile.am b/src/Makefile.am index 0d52eb76..1bb0f1b3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -88,7 +88,7 @@ version.c: $(wget_SOURCES) ../lib/libgnu.a $(MD5_LDADD) \ check_LIBRARIES = libunittest.a libunittest_a_SOURCES = $(wget_SOURCES) test.c build_info.c test.h nodist_libunittest_a_SOURCES = version.c -libunittest_a_CPPFLAGS = -DTESTING -I$(top_srcdir)/lib +libunittest_a_CPPFLAGS = -DTESTING -I$(top_builddir)/lib -I$(top_srcdir)/lib libunittest_a_LIBADD = $(LIBOBJS) EXTRA_DIST = build_info.c.in diff --git a/tests/ChangeLog b/tests/ChangeLog index 09b0fe58..9bc9748f 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2010-05-07 Giuseppe Scrivano + + * Makefile.am (LIBS): Add definition. + (LDADD): Add LIBS. + 2010-03-01 Steven Schubiger * Test-i-ftp.px: Test --input-file in conjunction with FTP. @@ -18,7 +23,7 @@ * Test-E-k-K.px, Test-cookies-401.px, Test-ftp-bad-list.px, Test-iri-list.px, Test-iri.px: Removed -d from invocation. Patch by Mike Frysinger. - + 2009-09-27 Micah Cowan * Test-idn-cmd.px, Test-idn-headers.px, Test-idn-meta.px, @@ -37,7 +42,7 @@ * run-px: Exit with a failure if there were any tests with "unknown" exit statuses. - + * Test-auth-with-content-disposition.px: New. Test Content-Disposition support when HTTP authentication is required. * run-px, Makefile.am (EXTRA_DIST): Added @@ -140,7 +145,7 @@ 2009-08-27 Micah Cowan * WgetTest.pm.in (run): Shift the errcode right by 8 binary places. - + * Test--spider-fail.px, Test--spider-r--no-content-disposition.px, Test--spider-r--no-content-disposition-trivial.px, Test--spider-r-HTTP-Content-Disposition.px, Test--spider-r.px, @@ -175,7 +180,7 @@ Test-ftp-iri-recursive.px, Test-ftp-iri-disabled.px, Test-idn-cmd.px, Test-idn-robots.px: Adjust wget invocations, replacing --locale with --local-encoding. - + 2009-07-07 Steven Schubiger * Makefile.am: Add IDN/IRI test files and Test-meta-robots.px @@ -184,7 +189,7 @@ 2009-07-05 Micah Cowan * Test-meta-robots.px: Added. - + * run-px: Add Test-meta-robots.px to the list. 2009-07-03 Micah Cowan @@ -342,7 +347,7 @@ path (made necessary by the accompanying change to HTTPServer.pm). 2008-08-14 Xavier Saint - + * Test-iri-list.px : Fetch files from a remote list. 2008-08-03 Xavier Saint @@ -441,7 +446,7 @@ * Makefile.am (run-px-tests): Replaced ugly list of tests with run-px Perl script to manage running them. - + * run-px: Added. * FTPServer.pm (run): Avoid re-forking. Fixes bug #20458. @@ -577,7 +582,7 @@ * Test-np.px: Added test for -np. * HTTPTest.pm: Ignore initial '/' character in requested URLs. - + 2006-10-12 Mauro Tortonesi * Test1.px: Renamed to Test-noop.px. @@ -597,13 +602,13 @@ * Test-O-nonexisting.px: Ditto. * Test5.px: Renamed to Test-HTTP-Content-Disposition.px. - + * Test-HTTP-Content-Disposition.px: Ditto. - + * Test6.px: Renamed to Test-HTTP-Content-Disposition-1.px. - + * Test-HTTP-Content-Disposition-1.px: Ditto. - + * Test7.px: Renamed to Test-HTTP-Content-Disposition-2.px. * Test-HTTP-Content-Disposition-2.px: Ditto. @@ -615,13 +620,13 @@ * Test-Restrict-Lowercase.px: Ditto. * Test10.px: Renamed to Test-Restrict-Uppercase.px. - + * Test-Restrict-Uppercase.px: Ditto. * Test--spider.px: Added test for spider mode. - + * Test--spider-fail.px: Added failing test for spider mode. - + * Test--spider-r.px: Added test for recursive spider mode. * Test-c.px: Added test for --continue mode. @@ -633,7 +638,7 @@ * Test-O.px: Added test for -O. * Test-N-current.px: Added test for -N. - + * Test-N-old.px: Added test for -N. * Test-E-k.px: Added test for -E -k. @@ -651,7 +656,7 @@ 2006-06-13 Mauro Tortonesi * Test9.px: Added test for --restrict-file-names=lowercase option. - + * Test10.px: Added test for --restrict-file-names=uppercase option. 2006-05-26 Mauro Tortonesi @@ -666,9 +671,9 @@ * Test1.px: Removed unneeded ../src/ from command line. * Test2.px: Ditto. - + * Test3.px: Ditto. - + * Test4.px: Ditto. * Test5.px: Ditto. @@ -691,24 +696,24 @@ * Test5.px: Added test for HTTP Content-Disposition support. * Test6.px: Ditto. - + * Test7.px: Ditto. 2006-04-27 Mauro Tortonesi - + * HTTPServer.pm: Serve index.html if no filename is given. * Test.pm: Added support for pre-existing files. - + 2006-01-24 Mauro Tortonesi * HTTPServer.pm: Enhanced logging support. * HTTPTest.pm: Updated to new test format. - + * Test.pm: Improved test setup, verification and cleanup. Major refactoring. - + * Test1.px: Updated to new test format. * Test2.px: Updated to new test format. @@ -717,15 +722,15 @@ * Test4.px: Added new test for quiet download of nonexistent URL with --output-document option. - + 2005-12-05 Mauro Tortonesi * HTTPServer.pm: Refactored as a subclass of HTTP::Daemon. Removed the old run method and renamed the old run_daemon method to run. Added support for partial - + * Testing.pm: Renamed to HTTPTest.pm. - + * HTTPTest.pm: Refactored as a subclass of Test. Renamed Run_HTTP_Test to run, verify_download to _verify_download and added support for timestamp checking. @@ -734,15 +739,15 @@ testcase. * test1: Renamed to Test1.px. - + * Test1.px: Refactored as an instance of the HTTPTest class. - + * Test2.px: Added -N HTTP test. 2005-11-02 Mauro Tortonesi * HTTPServer.pm: Added basic support for HTTP testing. - + * Testing.pm: Added basic support for feature testing (only HTTP testing is supported at the moment). diff --git a/tests/Makefile.am b/tests/Makefile.am index e83b03a8..75d9660e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -33,6 +33,8 @@ PERL = perl PERLRUN = $(PERL) -I$(srcdir) +LIBS = @LIBSSL@ @LIBGNUTLS@ @LIBICONV@ @LIBINTL@ @W32LIBS@ @LIBS@ + .PHONY: test run-unit-tests run-px-tests check-local: test @@ -131,7 +133,6 @@ EXTRA_DIST = FTPServer.pm FTPTest.pm HTTPServer.pm HTTPTest.pm \ check_PROGRAMS = unit-tests unit_tests_SOURCES = -LDADD = ../src/libunittest.a ../lib/libgnu.a @LIBSSL@ @LIBGNUTLS@ \ - @MD5_LDADD@ +LDADD = ../src/libunittest.a ../lib/libgnu.a @MD5_LDADD@ $(LIBS) CLEANFILES = *~ *.bak core core.[0-9]* -- 2.39.2