]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix various trunk unit test build issues
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 21 Jul 2014 05:39:57 +0000 (22:39 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 21 Jul 2014 05:39:57 +0000 (22:39 -0700)
src/Makefile.am
src/comm/ModPoll.cc
src/comm/ModSelect.cc
src/comm/ModSelectWin32.cc
src/icmp/Makefile.am
src/ip/Makefile.am
src/ssl/support.cc
test-suite/Makefile.am
test-suite/mem_node_test.cc

index 14ddc49bd95ef5df39e409d83350c78af8dcafd7..f37471e4db15f396f31fe2500ae9c427817a242f 100644 (file)
@@ -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)
index 9e0a67b5e162091eef4f2519f3e291f2a0597620..ff598818ffac07214cabcd2d59ce72b93f2fddca 100644 (file)
@@ -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;
     }
index 18ccbb08062f6e58985a601d97a5954ffa238575..6e3e9c6c2896615ce40157ac8cbb64806aa97a2f 100644 (file)
@@ -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;
index 023f5a21aa3b2dce8064c960bd7350839e3f4cf8..2bb5a258dc9e20dd1c22dc79d0d7f8331385415a 100644 (file)
@@ -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;
index 4cde92efeeb128aea51b9857cfd9cc9a3a1eac54..d39a8a13c21569f5c727da5ef44b909801e112fd 100644 (file)
@@ -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)
index 52dcd010283414eb4388c387969d22ed715dacda..2b2337d3425d4ae84b57e301456fec559b9e34f5 100644 (file)
@@ -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) \
index b3493f168c80eac1e9e2a911e5c5edf70527787e..ad13df786dc1e7d337fba47910cb504325efc1b2 100644 (file)
@@ -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) {
index d9d39e0822e4f673c08fde0c5df559cb94f27bff..9ea73ca16019788d407d6da56e0097a2282dfbb3 100644 (file)
@@ -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)
 
index 7e7daca27b8a170992cab1432f5bb78655a85abc..b30f3e995612eec471168b9aaf703071023ad0c4 100644 (file)
@@ -36,6 +36,7 @@
 
 #include <iostream>
 
+#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)