From: Amos Jeffries Date: Mon, 21 Jul 2014 05:39:57 +0000 (-0700) Subject: Fix various trunk unit test build issues X-Git-Tag: SQUID_3_5_0_1~141 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d00790b208b31395d0aec1e684f7c214d20948f1;p=thirdparty%2Fsquid.git Fix various trunk unit test build issues --- diff --git a/src/Makefile.am b/src/Makefile.am index 14ddc49bd9..f37471e4db 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1370,12 +1370,14 @@ tests_testBoilerplate_SOURCES = \ tests/testBoilerplate.cc \ tests/testMain.cc \ tests/testBoilerplate.h \ + tests/stub_debug.cc \ tests/stub_time.cc nodist_tests_testBoilerplate_SOURCES = \ $(TESTSOURCES) tests_testBoilerplate_LDADD= \ $(SQUID_CPPUNIT_LIBS) \ $(SSLLIB) \ + base/libbase.la \ $(COMPAT_LIB) \ $(XTRA_LIBS) tests_testBoilerplate_LDFLAGS = $(LIBADD_DL) diff --git a/src/comm/ModPoll.cc b/src/comm/ModPoll.cc index 9e0a67b5e1..ff598818ff 100644 --- a/src/comm/ModPoll.cc +++ b/src/comm/ModPoll.cc @@ -196,7 +196,7 @@ fdIsDns(int fd) static int fdIsTcpListen(int fd) { - for (const AnyP::PortCfgPointer s = HttpPortList; s != NULL; s = s->next) { + for (AnyP::PortCfgPointer s = HttpPortList; s != NULL; s = s->next) { if (s->listenConn != NULL && s->listenConn->fd == fd) return 1; } diff --git a/src/comm/ModSelect.cc b/src/comm/ModSelect.cc index 18ccbb0806..6e3e9c6c28 100644 --- a/src/comm/ModSelect.cc +++ b/src/comm/ModSelect.cc @@ -197,7 +197,7 @@ fdIsDns(int fd) static int fdIsTcpListener(int fd) { - for (const AnyP::PortCfgPointer s = HttpPortList; s != NULL; s = s->next) { + for (AnyP::PortCfgPointer s = HttpPortList; s != NULL; s = s->next) { if (s->listenConn != NULL && s->listenConn->fd == fd) return 1; } @@ -320,7 +320,7 @@ comm_select_tcp_incoming(void) // XXX: only poll sockets that won't be deferred. But how do we identify them? - for (const AnyP::PortCfgPointer s = HttpPortList; s != NULL; s = s->next) { + for (AnyP::PortCfgPointer s = HttpPortList; s != NULL; s = s->next) { if (Comm::IsConnOpen(s->listenConn)) { fds[nfds] = s->listenConn->fd; ++nfds; diff --git a/src/comm/ModSelectWin32.cc b/src/comm/ModSelectWin32.cc index 023f5a21aa..2bb5a258dc 100644 --- a/src/comm/ModSelectWin32.cc +++ b/src/comm/ModSelectWin32.cc @@ -191,7 +191,7 @@ fdIsDns(int fd) static int fdIsTcpListener(int fd) { - for (const AnyP::PortCfgPointer s = HttpPortList; s != NULL; s = s->next) { + for (AnyP::PortCfgPointer s = HttpPortList; s != NULL; s = s->next) { if (s->listenConn != NULL && s->listenConn->fd == fd) return 1; } @@ -317,7 +317,7 @@ comm_select_tcp_incoming(void) // XXX: only poll sockets that won't be deferred. But how do we identify them? - for (const AnyP::PortCfgPointer s = HttpPortList; s != NULL; s = s->next) { + for (AnyP::PortCfgPointer s = HttpPortList; s != NULL; s = s->next) { if (Comm::IsConnOpen(s->listenConn)) { fds[nfds] = s->listenConn->fd; ++nfds; diff --git a/src/icmp/Makefile.am b/src/icmp/Makefile.am index 4cde92efee..d39a8a13c2 100644 --- a/src/icmp/Makefile.am +++ b/src/icmp/Makefile.am @@ -114,6 +114,7 @@ testIcmp_LDADD=\ $(SQUID_CPPUNIT_LA) \ libicmp-core.la \ ../ip/libip.la \ + ../base/libbase.la \ $(COMPAT_LIB) \ $(XTRA_LIBS) testIcmp_DEPENDENCIES= $(SQUID_CPPUNIT_LA) diff --git a/src/ip/Makefile.am b/src/ip/Makefile.am index 52dcd01028..2b2337d342 100644 --- a/src/ip/Makefile.am +++ b/src/ip/Makefile.am @@ -28,6 +28,7 @@ nodist_testIpAddress_SOURCES= \ $(top_srcdir)/src/tests/testMain.cc testIpAddress_LDADD= \ libip.la \ + ../base/libbase.la \ $(XTRA_LIBS) \ $(COMPAT_LIB) \ $(SQUID_CPPUNIT_LA) \ diff --git a/src/ssl/support.cc b/src/ssl/support.cc index b3493f168c..ad13df786d 100644 --- a/src/ssl/support.cc +++ b/src/ssl/support.cc @@ -1774,7 +1774,7 @@ setSessionCallbacks(SSL_CTX *ctx) static bool isSslServer() { - if (HttpsPortList.valid()) + if (HttpsPortList != NULL) return true; for (AnyP::PortCfgPointer s = HttpPortList; s != NULL; s = s->next) { diff --git a/test-suite/Makefile.am b/test-suite/Makefile.am index d9d39e0822..9ea73ca160 100644 --- a/test-suite/Makefile.am +++ b/test-suite/Makefile.am @@ -6,6 +6,7 @@ AUTOMAKE_OPTIONS = subdir-objects INCLUDES += -I$(srcdir) LDADD = \ + $(top_builddir)/src/base/libbase.la \ $(top_builddir)/src/globals.o \ $(top_builddir)/src/time.o \ $(top_builddir)/lib/libmiscutil.la \ @@ -77,7 +78,7 @@ ESIExpressions_SOURCES = ESIExpressions.cc $(DEBUG_SOURCE) ESIExpressions_LDADD = $(top_builddir)/src/esi/Expression.o \ $(LDADD) -mem_node_test_SOURCES = mem_node_test.cc +mem_node_test_SOURCES = mem_node_test.cc $(DEBUG_SOURCE) mem_node_test_LDADD = $(top_builddir)/src/mem_node.o $(LDADD) mem_hdr_test_SOURCES = mem_hdr_test.cc $(DEBUG_SOURCE) @@ -86,9 +87,9 @@ mem_hdr_test_LDADD = \ $(top_builddir)/src/mem_node.o \ $(LDADD) -MemPoolTest_SOURCES = MemPoolTest.cc +MemPoolTest_SOURCES = MemPoolTest.cc $(DEBUG_SOURCE) -splay_SOURCES = splay.cc +splay_SOURCES = splay.cc $(DEBUG_SOURCE) syntheticoperators_SOURCES = syntheticoperators.cc $(DEBUG_SOURCE) diff --git a/test-suite/mem_node_test.cc b/test-suite/mem_node_test.cc index 7e7daca27b..b30f3e9956 100644 --- a/test-suite/mem_node_test.cc +++ b/test-suite/mem_node_test.cc @@ -36,6 +36,7 @@ #include +#if 0 /* TODO: put this in a libTest */ void xassert(const char *msg, const char *file, int line) @@ -43,6 +44,7 @@ xassert(const char *msg, const char *file, int line) std::cout << "Assertion failed: (" << msg << ") at " << file << ":" << line << std::endl; exit (1); } +#endif int main(int argc, char **argv)