]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix out-of-sourcedir "make check" dependency misdetection.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Sun, 13 Jul 2008 21:40:50 +0000 (23:40 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Sun, 13 Jul 2008 21:40:50 +0000 (23:40 +0200)
Fix "make check" by implementing a cachemgr stub to resolve link dependencies.

src/ICAP/Makefile.am
src/Makefile.am
src/adaptation/Makefile.am
src/auth/Makefile.am
src/fs/Makefile.am
src/main.cc
src/repl/Makefile.am
src/tests/stub_cache_manager.cc [new file with mode: 0644]
src/tests/testCacheManager.cc

index 6e4c5d851b46e70f2652cdcca653aff6b8079cbf..2f91bf853bbffa7435a99f19f6915e5ab7aa12bd 100644 (file)
@@ -33,7 +33,7 @@ libicap_la_SOURCES = \
 check_PROGRAMS = testHeaders
 
 ## test .h correctness
-testHeaders: *.h
+testHeaders: $(top_srcdir)/src/ICAP/*.h
        $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "." || exit 1
 
 ## No such file...
index 734626394d7a3308803abc450a056653218d340f..b07c581f42472b2e3178e4c46d3dfb5852616a91 100644 (file)
@@ -1189,7 +1189,7 @@ check_PROGRAMS+= testHeaders \
 
 ## Special Universal .h dependency test script
 ## aborts if error encountered
-testHeaders: *.h DiskIO/*.h
+testHeaders: $(top_srcdir)/src/*.h $(top_srcdir)/src/DiskIO/*.h
        $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "." || exit 1
        $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "DiskIO" || exit 1
 ## src/repl/ has no .h files and its own makefile.
@@ -1231,6 +1231,7 @@ tests_testAuth_SOURCES= tests/testAuth.cc tests/testMain.cc  tests/testAuth.h $(
        StatHist.cc HttpHdrRange.cc ETag.cc tests/stub_errorpage.cc \
        tests/stub_HttpRequest.cc tests/stub_DelayId.cc \
        tests/stub_MemObject.cc mem_node.cc \
+       tests/stub_cache_manager.cc \
        stmem.cc \
        tests/stub_comm.cc \
        tests/stub_http.cc \
@@ -1311,6 +1312,7 @@ tests_testACLMaxUserIP_SOURCES= \
        tests/stub_DelayId.cc \
        tests/stub_MemObject.cc \
        tests/stub_store.cc \
+       tests/stub_cache_manager.cc \
        tests/testACLMaxUserIP.cc \
        tests/testACLMaxUserIP.h \
        tests/testMain.cc \
index fb09a726c6dadc209f209f91ae9104a909744981..ec77f05ce598ce8a6e2188c204e0e97e99c451c5 100644 (file)
@@ -32,7 +32,7 @@ libadaptation_la_SOURCES = \
 check_PROGRAMS = testHeaders
 
 ## test .h correctness
-testHeaders: *.h
+testHeaders: $(top_srcdir)/src/adaptation/*.h
        $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "." || exit 1
 
 ## No such file...
index 92093148438dba9cd855f754001f8199cf14c86a..8dd460ac555700791a501db7db6a425839990c46 100644 (file)
@@ -24,7 +24,7 @@ check_PROGRAMS= testHeaders
 
 ## Special Universal .h dependency test script
 ## aborts if error encountered
-testHeaders: basic/*.h digest/*.h ntlm/*.h negotiate/*.h
+testHeaders: $(top_srcdir)/src/auth/basic/*.h $(top_srcdir)/src/auth/digest/*.h $(top_srcdir)/src/auth/ntlm/*.h $(top_srcdir)/src/auth/negotiate/*.h
        $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "basic" || exit 1
        $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "digest" || exit 1
        $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "ntlm" || exit 1
index c2a8a6a7f0d75ce49fa7dda81dfd394439209cb4..e28a7db5c5e7e92e7e8d0f466e7bc517bbe0b96d 100644 (file)
@@ -36,7 +36,7 @@ check_PROGRAMS=testHeaders
 
 ## Special Universal .h dependency test script
 ## aborts if error encountered
-testHeaders: ufs/*.h coss/*.h
+testHeaders: $(top_srcdir)/src/fs/ufs/*.h $(top_srcdir)/src/fs/coss/*.h
        $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "ufs" || exit 1
        $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "coss" || exit 1
 ## diskd/ has no .h files
index 17f416f2122732b66340d2fdf8c92cf3f1d5145b..d843b72ed39a57f333f6779f2d092edb715eb488 100644 (file)
@@ -726,7 +726,6 @@ mainReconfigure(void)
     serverConnectionsOpen();
 
     neighbors_init();
-    // neighborsRegisterWithCacheManager(); //moved to neighbors_init()
 
     storeDirOpenSwapLogs();
 
index 0710ce2b98b39aac82db25c1fcdd17eadf707306..ff7823cabff20914733674fccf40450a49f7b270 100644 (file)
@@ -22,7 +22,7 @@ check_PROGRAMS= testHeaders
 
 ## Special Universal .h dependency test script
 ## aborts if error encountered
-testHeaders: heap/*.h
+testHeaders: $(top_srcdir)/src/repl/heap/*.h
        $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "heap" || exit 1
 ## ./ has no .h files.
 ## ./lru/ has no .h files.
diff --git a/src/tests/stub_cache_manager.cc b/src/tests/stub_cache_manager.cc
new file mode 100644 (file)
index 0000000..40ee815
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * AUTHOR: Francesco Chemolli
+ *
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; see the CREDITS file for full details.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+#include "CacheManager.h"
+#include "squid.h"
+
+CacheManager::CacheManager()
+{
+}
+
+void
+CacheManager::registerAction(char const * action, char const * desc, OBJH * handler, int pw_req_flag, int atomic)
+{
+       fatal("Not implemented");
+}
+
+void
+CacheManager::registerAction(CacheManagerAction *anAction)
+{
+       fatal("Not implemented");
+}
+
+CacheManagerAction *
+CacheManager::findAction(char const * action)
+{
+       fatal("Not implemented");
+       return 0; //notreached
+}
+
+void
+CacheManager::Start(int fd, HttpRequest * request, StoreEntry * entry)
+{
+       fatal("Not implemented");
+}
+
+CacheManager*
+CacheManager::GetInstance()
+{
+       fatal("Not implemented");
+       return 0; //notreached
+}
+
index a66a54f564c2157c40dc242393fafa7a6e95a9c4..2de748ba4b8b3bd98fa5424f14d2707434e6a538 100644 (file)
@@ -32,7 +32,7 @@ void testCacheManager::setUp()
 void
 testCacheManager::testCreate()
 {
-    CacheManager();
+    CacheManager()::GetInstance(); //it's a singleton..
 }
 
 /* an action to register */