diff --git a/src/Makefile.am b/src/Makefile.am index d26b014a..825a1568 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -101,7 +101,7 @@ distclean-local: rm -f css.c css_.c check_LIBRARIES = libunittest.a -libunittest_a_SOURCES = $(wget_SOURCES) test.c build_info.c test.h +libunittest_a_SOURCES = $(wget_SOURCES) build_info.c nodist_libunittest_a_SOURCES = version.c libunittest_a_CPPFLAGS = -DTESTING "-I$(top_builddir)/lib" "-I$(top_srcdir)/lib" libunittest_a_LIBADD = $(LIBOBJS) diff --git a/src/hsts.c b/src/hsts.c index e449a9f7..ef028a06 100644 --- a/src/hsts.c +++ b/src/hsts.c @@ -36,7 +36,7 @@ as that of the covered work. */ #include "hash.h" #include "c-ctype.h" #ifdef TESTING -#include "test.h" +#include "../tests/unit-tests.h" #endif #include diff --git a/src/http.c b/src/http.c index 4d2bb4ea..c3aaa140 100644 --- a/src/http.c +++ b/src/http.c @@ -71,7 +71,7 @@ as that of the covered work. */ #endif #ifdef TESTING -#include "test.h" +#include "../tests/unit-tests.h" #endif #ifdef __VMS diff --git a/src/init.c b/src/init.c index e4186abe..525b4f69 100644 --- a/src/init.c +++ b/src/init.c @@ -72,7 +72,7 @@ as that of the covered work. */ #include "c-strcase.h" #ifdef TESTING -#include "test.h" +#include "../tests/unit-tests.h" #endif diff --git a/src/metalink.c b/src/metalink.c index 2dc128fe..47c8accb 100644 --- a/src/metalink.c +++ b/src/metalink.c @@ -53,7 +53,7 @@ as that of the covered work. */ #endif #ifdef TESTING -#include "test.h" +#include "../tests/unit-tests.h" #endif /* Loop through all files in metalink structure and retrieve them. diff --git a/src/res.c b/src/res.c index 353be8af..278ca936 100644 --- a/src/res.c +++ b/src/res.c @@ -84,7 +84,7 @@ as that of the covered work. */ #include "c-strcase.h" #ifdef TESTING -#include "test.h" +#include "../tests/unit-tests.h" #endif struct path_info { diff --git a/src/url.c b/src/url.c index e3088b36..2e0b7304 100644 --- a/src/url.c +++ b/src/url.c @@ -51,7 +51,7 @@ as that of the covered work. */ #endif /* def __VMS */ #ifdef TESTING -#include "test.h" +#include "../tests/unit-tests.h" #endif enum { diff --git a/src/utils.c b/src/utils.c index 0eeafd05..fdde4af7 100644 --- a/src/utils.c +++ b/src/utils.c @@ -103,7 +103,7 @@ as that of the covered work. */ #endif /* def __VMS */ #ifdef TESTING -#include "test.h" +#include "../tests/unit-tests.h" #endif #include "exits.h" diff --git a/tests/Makefile.am b/tests/Makefile.am index 15c53c3a..3842fc89 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -142,11 +142,12 @@ EXTRA_DIST = FTPServer.pm FTPTest.pm HTTPServer.pm HTTPTest.pm \ certs valgrind-suppressions valgrind-suppressions-ssl check_PROGRAMS = unit-tests -unit_tests_SOURCES = +unit_tests_SOURCES = unit-tests.c unit-tests.h LDADD = ../src/libunittest.a ../lib/libgnu.a $(GETADDRINFO_LIB) $(HOSTENT_LIB)\ $(INET_NTOP_LIB) $(LIBSOCKET) $(LIB_CLOCK_GETTIME) $(LIB_CRYPTO)\ $(LIB_NANOSLEEP) $(LIB_POSIX_SPAWN) $(LIB_SELECT) $(LIBICONV) $(LIBINTL)\ $(LIBTHREAD) $(LIBUNISTRING) $(SERVENT_LIB) +AM_CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib -DLOCALEDIR=\"$(localedir)\" CLEANFILES = *~ *.bak core core.[0-9]* diff --git a/src/test.c b/tests/unit-tests.c similarity index 97% rename from src/test.c rename to tests/unit-tests.c index 083ea0e0..0db434be 100644 --- a/src/test.c +++ b/tests/unit-tests.c @@ -34,11 +34,7 @@ as that of the covered work. */ # include #endif -#include "test.h" - -#ifndef TESTING -#error "TESTING not set!!!" -#endif +#include "unit-tests.h" const char *program_argstring = "TEST"; diff --git a/src/test.h b/tests/unit-tests.h similarity index 100% rename from src/test.h rename to tests/unit-tests.h