From: Amos Jeffries Date: Fri, 16 Nov 2018 06:04:45 +0000 (+0000) Subject: SourceLayout: Cleanup unit tests (#324) X-Git-Tag: M-staged-PR330~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f1263147d9f8c91de21e0edca607c47cad7eb573;p=thirdparty%2Fsquid.git SourceLayout: Cleanup unit tests (#324) Polish up and add some structure to the unit tests in src/Makefile.am. Documenting current best practice for new test additions and shuffling of lines around to make the tests easily managed in future, consistent with that practice. There are two functional changes amongst the non-logic changes; 1) testUfs and testRock src/fs/ tests are updated to using automake conditionals to wrap the entire set of automake lists. Not just the part adding the test binary to those built. This reduces the compiler work creating dependency information for them in builds where they are not going to be used. 2) testRefCount has missing LDFLAGS list added Also, shuffling of most SOURCES lists into nodist_*_SOURCES to comply with the documented practice is left to followup work pruning those lists down. --- diff --git a/src/Makefile.am b/src/Makefile.am index c83c3781bb..aefe18da01 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -38,7 +38,7 @@ if ENABLE_AUTH SUBDIRS += auth AUTH_LIBS= auth/libauth.la AUTH_ACL_LIBS= auth/libacls.la -check_PROGRAMS+= tests/testACLMaxUserIP +check_PROGRAMS += tests/testACLMaxUserIP endif DIST_SUBDIRS += auth @@ -173,8 +173,6 @@ noinst_LTLIBRARIES = libsquid.la EXTRA_PROGRAMS = \ unlinkd \ recv-announce \ - tests/testUfs \ - tests/testRock \ ufsdump ## cfgen is used when building squid @@ -862,361 +860,172 @@ TESTSOURCES= \ test_tools.cc \ globals.cc -check_PROGRAMS+=\ - tests/testBoilerplate \ - tests/testCacheManager \ - tests/testCharacterSet \ - tests/testDiskIO \ - tests/testDns \ - tests/testEnumIterator \ - tests/testEvent \ - tests/testEventLoop \ - tests/test_http_range \ - tests/testTokenizer \ - tests/testHttp1Parser \ - tests/testHttpReply \ - tests/testHttpRequest \ - tests/testIcmp \ - tests/testIpAddress \ - tests/testMem \ - tests/testNetDb \ - tests/testStore \ - tests/testString \ - tests/testURL \ - tests/testSBuf \ - tests/testSBufList \ - tests/testConfigParser \ - tests/testStatHist \ - tests/testLookupTable \ - tests/testYesNoNone - -if ENABLE_FS_ROCK -check_PROGRAMS += tests/testRock -endif -if ENABLE_FS_UFS -check_PROGRAMS += tests/testUfs -endif - -## NP: required to run the above list. check_PROGRAMS only builds the binaries... -TESTS += $(check_PROGRAMS) - ### Template for new Unit Test Program -## - add tests/testX to check_PROGRAMS above. -## - copy template below and substitue X for class name +## - copy template below and substitute X for class name +## - place code being tested in _SOURCES +## - place stubs etc. requiredd to link in nodist_*_SOURCES ## - add other component .(h|cc) files needed to link and run tests ## -##NP: (TESTSOURCES) defines stub debugs() and new/delete for testing +## NP: (TESTSOURCES) defines stub debugs() and new/delete for testing ## -#tests_testX_SOURCES=\ -# tests/testX.h \ +#check_PROGRAMS += tests/testX +#tests_testX_SOURCES= \ # tests/testX.cc \ -# X.h \ -# X.cc -#nodist_tests_testX_SOURCES=\ -# tests/stubs_as_needed.cc\ +# tests/testX.h \ +# X.cc \ +# X.h +#nodist_tests_testX_SOURCES= \ +# tests/stubs_as_needed.cc \ # $(TESTSOURCES) -#tests_testX_LDFLAGS = $(LIBADD_DL) #tests_testX_LDADD=\ # $(LIBCPPUNIT_LIBS) \ # $(COMPAT_LIB) \ # $(XTRA_LIBS) +#tests_testX_LDFLAGS = $(LIBADD_DL) -# - add other component .(h|cc) files needed to link and run tests -tests_testHttpReply_SOURCES=\ - cbdata.cc \ - cbdata.h \ - ConfigParser.cc \ - tests/stub_ETag.cc \ - fatal.h \ - tests/stub_fatal.cc \ - HttpBody.h \ - HttpBody.cc \ - HttpHeaderFieldStat.h \ - HttpHdrCc.h \ - HttpHdrCc.cc \ - HttpHdrContRange.cc \ - HttpHdrContRange.h \ - HttpHdrRange.cc \ - HttpHdrSc.cc \ - HttpHdrSc.h \ - HttpHdrScTarget.cc \ - HttpHdrScTarget.h \ - HttpHeader.h \ - HttpHeader.cc \ - HttpHeaderMask.h \ - HttpHeaderFieldInfo.h \ - HttpHeaderTools.h \ - HttpHeaderTools.cc \ - HttpControlMsg.cc \ - HttpControlMsg.h \ - HttpReply.cc \ - HttpReply.h \ - MasterXaction.cc \ - MasterXaction.h \ - MemBuf.cc \ - MemBuf.h \ - mime_header.h \ - mime_header.cc \ - Notes.h \ - Notes.cc \ - SquidString.h \ - SquidTime.h \ - tests/stub_SBufDetailedStats.cc \ - String.cc \ - StrList.h \ - StrList.cc \ - log/access_log.h \ - tests/stub_access_log.cc \ - cache_cf.h \ - tests/stub_cache_cf.cc \ - tests/stub_cache_manager.cc \ - tests/stub_comm.cc \ +## A demonstration test that does nothing but shows the salient points +## involved in writing tests. +check_PROGRAMS += tests/testBoilerplate +tests_testBoilerplate_SOURCES = \ + tests/testBoilerplate.cc \ + tests/testBoilerplate.h +nodist_tests_testBoilerplate_SOURCES = \ + $(TESTSOURCES) +tests_testBoilerplate_LDADD= \ + $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) +tests_testBoilerplate_LDFLAGS = $(LIBADD_DL) + +# Unit Tests are listed below by sub-directory with order matching the SUBDIRS +# dependency-based list so that simpler code is tested before more complex code +# which uses it. + +## Tests of mem/* + +check_PROGRAMS += tests/testMem +tests_testMem_SOURCES = \ + tests/testMem.cc \ + tests/testMem.h +nodist_tests_testMem_SOURCES = \ tests/stub_debug.cc \ - tests/stub_errorpage.cc \ - tests/stub_event.cc \ - tests/stub_fd.cc \ - tests/stub_HelperChildConfig.cc \ - tests/stub_libformat.cc \ - tests/stub_libauth.cc \ - tests/stub_libcomm.cc \ - tests/stub_libmgr.cc \ - tests/stub_libsecurity.cc \ - tests/stub_libsslsquid.cc \ - StatCounters.h \ - StatCounters.cc \ - StatHist.h \ - tests/stub_StatHist.cc \ - repl_modules.h \ - tests/stub_store.cc \ - tests/stub_store_stats.cc \ - tools.h \ - tests/stub_tools.cc \ - tests/stub_HttpRequest.cc \ - tests/testHttpReply.cc \ - tests/testHttpReply.h \ + tests/stub_SBuf.cc \ tests/stub_time.cc \ - tests/stub_libanyp.cc \ - wordlist.h \ - wordlist.cc -nodist_tests_testHttpReply_SOURCES=\ - $(TESTSOURCES) \ - hier_code.cc -tests_testHttpReply_LDFLAGS = $(LIBADD_DL) -tests_testHttpReply_LDADD=\ - CommCalls.o \ - http/libhttp.la \ - parser/libparser.la \ - acl/libacls.la \ - acl/libapi.la \ - acl/libstate.la \ - anyp/libanyp.la \ - ip/libip.la \ + $(TESTSOURCES) +tests_testMem_LDADD= \ base/libbase.la \ - ipc/libipc.la \ mem/libmem.la \ - sbuf/libsbuf.la \ - $(top_builddir)/lib/libmisccontainers.la \ - $(top_builddir)/lib/libmiscencoding.la \ $(top_builddir)/lib/libmiscutil.la \ - $(NETTLELIB) \ - $(SSLLIB) \ $(LIBCPPUNIT_LIBS) \ $(COMPAT_LIB) \ $(XTRA_LIBS) +tests_testMem_LDFLAGS = $(LIBADD_DL) -tests_testACLMaxUserIP_SOURCES= \ - cbdata.cc \ - ClientInfo.h \ - tests/stub_CollapsedForwarding.cc \ - ConfigOption.cc \ - ConfigParser.cc \ - tests/stub_ETag.cc \ - event.cc \ - fatal.h \ - tests/stub_fatal.cc \ - FileMap.h \ - filemap.cc \ - HttpBody.cc \ - HttpHeader.h \ - HttpHeader.cc \ - HttpHeaderFieldInfo.h \ - HttpHeaderTools.h \ - HttpHeaderTools.cc \ - HttpHdrContRange.cc \ - HttpHdrRange.cc \ - HttpHeaderFieldStat.h \ - HttpHdrCc.h \ - HttpHdrCc.cc \ - HttpHdrSc.cc \ - HttpHdrScTarget.cc \ - int.h \ - int.cc \ - MasterXaction.cc \ - MasterXaction.h \ - Notes.cc \ - Notes.h \ - mem_node.cc \ - Parsing.cc \ - tests/stub_libsecurity.cc \ - SquidMath.cc \ - StatCounters.cc \ - StatCounters.h \ - StatHist.h \ - StrList.h \ - StrList.cc \ - tests/stub_StatHist.cc \ - stmem.cc \ - tests/stub_SBufDetailedStats.cc \ - String.cc \ - StoreIOState.cc \ - tests/stub_StoreMeta.cc \ - StoreMetaUnpacker.cc \ - StoreSwapLogData.cc \ - store_key_md5.h \ - store_key_md5.cc \ - swap_log_op.cc \ - swap_log_op.h \ - tests/stub_SwapDir.cc \ - Transients.cc \ - log/access_log.h \ - tests/stub_access_log.cc \ - cache_cf.h \ - tests/stub_cache_cf.cc \ - tests/stub_client_side.cc \ +## Tests of base/* + +check_PROGRAMS += tests/testCharacterSet +tests_testCharacterSet_SOURCES = \ + tests/testCharacterSet.cc \ + tests/testCharacterSet.h +nodist_tests_testCharacterSet_SOURCES = \ + base/CharacterSet.h \ + tests/stub_cbdata.cc \ tests/stub_debug.cc \ - tests/stub_DelayId.cc \ - tests/stub_errorpage.cc \ - fd.h \ - tests/stub_fd.cc \ - tests/stub_HttpRequest.cc \ - tests/stub_HttpReply.cc \ - tests/stub_ipc_TypedMsgHdr.cc \ - tests/stub_libauth.cc \ - tests/stub_libcomm.cc \ - tests/stub_libdiskio.cc \ - tests/stub_libformat.cc \ tests/stub_libmem.cc \ - tests/stub_libsslsquid.cc \ - tests/stub_MemObject.cc \ - tests/stub_MemStore.cc \ - mime.h \ - tests/stub_mime.cc \ - tests/stub_pconn.cc \ - tests/stub_Port.cc \ - repl_modules.h \ - tests/stub_store.cc \ - tests/stub_store_client.cc \ - store_rebuild.h \ - tests/stub_store_rebuild.cc \ - tests/stub_store_stats.cc \ - tests/stub_store_swapout.cc \ - tools.h \ - tests/stub_tools.cc \ - tests/stub_cache_manager.cc \ - tests/stub_UdsOp.cc \ - tests/testACLMaxUserIP.cc \ - tests/testACLMaxUserIP.h \ - tests/stub_time.cc \ - tests/stub_libanyp.cc \ - MemBuf.cc \ - wordlist.h \ - wordlist.cc -nodist_tests_testACLMaxUserIP_SOURCES= \ + tests/stub_MemBuf.cc \ + tests/stub_SBuf.cc \ $(TESTSOURCES) -tests_testACLMaxUserIP_LDADD= \ - libsquid.la \ - helper/libhelper.la \ - http/libhttp.la \ - parser/libparser.la \ - $(AUTH_ACL_LIBS) \ - ident/libident.la \ - acl/libacls.la \ - eui/libeui.la \ - acl/libstate.la \ - acl/libapi.la \ - anyp/libanyp.la \ +tests_testCharacterSet_LDADD= \ base/libbase.la \ - ip/libip.la \ - ipc/libipc.la \ - mgr/libmgr.la \ + $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) +tests_testCharacterSet_LDFLAGS = $(LIBADD_DL) + +check_PROGRAMS += tests/testEnumIterator +tests_testEnumIterator_SOURCES = \ + base/EnumIterator.h \ + tests/stub_debug.cc \ + tests/stub_libmem.cc \ + tests/stub_SBuf.cc \ + tests/testEnumIterator.h \ + tests/testEnumIterator.cc +nodist_tests_testEnumIterator_SOURCES = \ + $(TESTSOURCES) +tests_testEnumIterator_LDADD = \ + base/libbase.la \ + $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) +tests_testEnumIterator_LDFLAGS = $(LIBADD_DL) + +check_PROGRAMS += tests/testLookupTable +tests_testLookupTable_SOURCES = \ + tests/testLookupTable.h \ + tests/testLookupTable.cc \ + tests/stub_debug.cc \ + tests/stub_libmem.cc \ + tests/stub_SBufDetailedStats.cc \ + base/LookupTable.h +nodist_tests_testLookupTable_SOURCES = $(TESTSOURCES) +tests_testLookupTable_LDADD = \ sbuf/libsbuf.la \ - $(top_builddir)/lib/libmisccontainers.la \ - $(top_builddir)/lib/libmiscencoding.la \ - $(top_builddir)/lib/libmiscutil.la \ - $(NETTLELIB) \ - $(REGEXLIB) \ - $(SSLLIB) \ + base/libbase.la \ $(LIBCPPUNIT_LIBS) \ $(COMPAT_LIB) \ $(XTRA_LIBS) -tests_testACLMaxUserIP_LDFLAGS = $(LIBADD_DL) +tests_testLookupTable_LDFLAGS = $(LIBADD_DL) -## a demonstration test that does nothing but shows the salient points -## involved in writing tests. -tests_testBoilerplate_SOURCES = \ - tests/testBoilerplate.cc \ - tests/testBoilerplate.h \ +check_PROGRAMS += testRefCount +testRefCount_SOURCES= \ + base/Lock.h \ + base/RefCount.h \ + tests/testRefCount.cc +nodist_testRefCount_SOURCES= \ + tests/stub_cbdata.cc \ tests/stub_debug.cc \ tests/stub_libmem.cc \ - tests/stub_SBuf.cc \ - tests/stub_time.cc -nodist_tests_testBoilerplate_SOURCES = \ - tests/stub_cbdata.cc \ - tests/stub_MemBuf.cc \ - $(TESTSOURCES) -tests_testBoilerplate_LDADD= \ - $(SSLLIB) \ + tests/stub_MemBuf.cc +testRefCount_LDADD = \ base/libbase.la \ - $(LIBCPPUNIT_LIBS) \ + $(top_builddir)/lib/libmiscutil.la \ $(COMPAT_LIB) \ $(XTRA_LIBS) -tests_testBoilerplate_LDFLAGS = $(LIBADD_DL) +tests_testRefCount_LDFLAGS = $(LIBADD_DL) -## Tests of base/libbase.la objects -tests_testCharacterSet_SOURCES = \ - tests/testCharacterSet.cc \ - tests/testCharacterSet.h -nodist_tests_testCharacterSet_SOURCES = \ - base/CharacterSet.h \ - $(TESTSOURCES) \ - tests/stub_cbdata.cc \ +check_PROGRAMS += tests/testYesNoNone +tests_testYesNoNone_SOURCES = \ + tests/testYesNoNone.cc \ + tests/testYesNoNone.h +nodist_tests_testYesNoNone_SOURCES = \ + tests/STUB.h \ tests/stub_debug.cc \ tests/stub_libmem.cc \ - tests/stub_MemBuf.cc \ - tests/stub_SBuf.cc -tests_testCharacterSet_LDFLAGS = $(LIBADD_DL) -tests_testCharacterSet_LDADD= \ + tests/stub_SBuf.cc \ + base/YesNoNone.h +tests_testYesNoNone_LDADD= \ base/libbase.la \ $(LIBCPPUNIT_LIBS) \ $(COMPAT_LIB) \ $(XTRA_LIBS) +tests_testYesNoNone_LDFLAGS = $(LIBADD_DL) -## Tests of the CacheManager module. -tests_testCacheManager_SOURCES = \ +## Tests of anyp/* + +check_PROGRAMS += tests/testURL +## TODO: Trim this down once the insanity is over. +tests_testURL_SOURCES = \ AccessLogEntry.cc \ - debug.cc \ - RequestFlags.h \ - RequestFlags.cc \ - HttpRequest.cc \ - String.cc \ - tests/testCacheManager.cc \ - tests/testCacheManager.h \ - tests/stub_main_cc.cc \ - tests/stub_HttpControlMsg.cc \ - tests/stub_ipc_Forwarder.cc \ - tests/stub_store_stats.cc \ - tests/stub_EventLoop.cc \ - time.cc \ BodyPipe.cc \ - cache_manager.cc \ cache_cf.h \ AuthReg.h \ RefreshPattern.h \ cache_cf.cc \ - CachePeer.cc \ - CachePeer.h \ + tests/stub_cache_manager.cc \ CacheDigest.h \ tests/stub_CacheDigest.cc \ + CachePeer.cc \ + CachePeer.h \ carp.h \ tests/stub_carp.cc \ cbdata.cc \ @@ -1242,7 +1051,7 @@ tests_testCacheManager_SOURCES = \ dlink.cc \ $(DNSSOURCE) \ errorpage.cc \ - tests/stub_ETag.cc \ + ETag.cc \ event.cc \ external_acl.cc \ ExternalACLEntry.cc \ @@ -1259,17 +1068,13 @@ tests_testCacheManager_SOURCES = \ FwdState.h \ gopher.h \ gopher.cc \ - hier_code.h \ helper.cc \ + hier_code.h \ $(HTCPSOURCE) \ http.cc \ HttpBody.h \ HttpBody.cc \ - HttpHeader.h \ - HttpHeader.cc \ - HttpHeaderFieldInfo.h \ - HttpHeaderTools.h \ - HttpHeaderTools.cc \ + tests/stub_HttpControlMsg.cc \ HttpHeaderFieldStat.h \ HttpHdrCc.h \ HttpHdrCc.cc \ @@ -1277,7 +1082,17 @@ tests_testCacheManager_SOURCES = \ HttpHdrRange.cc \ HttpHdrSc.cc \ HttpHdrScTarget.cc \ + HttpHeader.h \ + HttpHeader.cc \ + HttpHeaderFieldInfo.h \ + HttpHeaderTools.h \ + HttpHeaderTools.cc \ HttpReply.cc \ + PeerPoolMgr.h \ + PeerPoolMgr.cc \ + RequestFlags.h \ + RequestFlags.cc \ + HttpRequest.cc \ icp_v2.cc \ icp_v3.cc \ $(IPC_SOURCE) \ @@ -1286,8 +1101,8 @@ tests_testCacheManager_SOURCES = \ int.cc \ internal.h \ internal.cc \ + tests/stub_libeui.cc \ LogTags.cc \ - tests/stub_libsecurity.cc \ MasterXaction.cc \ MasterXaction.h \ multicast.h \ @@ -1301,8 +1116,8 @@ tests_testCacheManager_SOURCES = \ mime_header.cc \ neighbors.h \ neighbors.cc \ - Notes.cc \ Notes.h \ + Notes.cc \ Parsing.cc \ pconn.cc \ peer_digest.cc \ @@ -1313,8 +1128,6 @@ tests_testCacheManager_SOURCES = \ peer_sourcehash.cc \ peer_userhash.h \ peer_userhash.cc \ - PeerPoolMgr.h \ - PeerPoolMgr.cc \ Pipeline.cc \ Pipeline.h \ redirect.h \ @@ -1332,11 +1145,6 @@ tests_testCacheManager_SOURCES = \ StatCounters.h \ StatCounters.cc \ StatHist.h \ - StrList.h \ - StrList.cc \ - tests/stub_libauth_acls.cc \ - tests/stub_libauth.cc \ - tests/stub_libdiskio.cc \ tests/stub_StatHist.cc \ stmem.cc \ repl_modules.h \ @@ -1360,13 +1168,30 @@ tests_testCacheManager_SOURCES = \ tests/stub_StoreMeta.cc \ StoreMetaUnpacker.cc \ StoreSwapLogData.cc \ - tools.h \ - tools.cc \ + String.cc \ + StrList.h \ + StrList.cc \ Transients.cc \ - tests/stub_tunnel.cc \ tests/stub_SwapDir.cc \ MemStore.cc \ - $(UNLINKDSOURCE) \ + tests/stub_debug.cc \ + tests/stub_libauth_acls.cc \ + tests/stub_libauth.cc \ + tests/stub_libdiskio.cc \ + tests/stub_libmem.cc \ + tests/stub_libsecurity.cc \ + tests/stub_main_cc.cc \ + tests/stub_ipc_Forwarder.cc \ + tests/stub_store_stats.cc \ + tests/testURL.cc \ + tests/testURL.h \ + tests/testUriScheme.cc \ + tests/testUriScheme.h \ + tests/stub_time.cc \ + tests/stub_EventLoop.cc \ + tools.h \ + tools.cc \ + tests/stub_tunnel.cc \ urn.h \ urn.cc \ wccp2.h \ @@ -1377,93 +1202,215 @@ tests_testCacheManager_SOURCES = \ $(WIN32_SOURCE) \ wordlist.h \ wordlist.cc -nodist_tests_testCacheManager_SOURCES = \ +nodist_tests_testURL_SOURCES = \ $(BUILT_SOURCES) -# comm.cc only requires comm/libcomm.la until fdc_table is dead. -tests_testCacheManager_LDADD = \ +tests_testURL_LDADD = \ libsquid.la \ clients/libclients.la \ servers/libservers.la \ - ftp/libftp.la \ helper/libhelper.la \ http/libhttp.la \ + ftp/libftp.la \ parser/libparser.la \ + anyp/libanyp.la \ ident/libident.la \ acl/libacls.la \ + eui/libeui.la \ acl/libstate.la \ acl/libapi.la \ dns/libdns.la \ base/libbase.la \ ip/libip.la \ fs/libfs.la \ - comm/libcomm.la \ - eui/libeui.la \ + $(SSL_LIBS) \ + ipc/libipc.la \ + mgr/libmgr.la \ + $(SNMP_LIBS) \ icmp/libicmp.la \ + comm/libcomm.la \ log/liblog.la \ format/libformat.la \ + store/libstore.la \ + sbuf/libsbuf.la \ + $(REGEXLIB) \ $(REPL_OBJS) \ $(ADAPTATION_LIBS) \ $(ESI_LIBS) \ - $(SSL_LIBS) \ - anyp/libanyp.la \ - ipc/libipc.la \ - mgr/libmgr.la \ - $(SNMP_LIBS) \ - mem/libmem.la \ - store/libstore.la \ + $(top_builddir)/lib/libmisccontainers.la \ + $(top_builddir)/lib/libmiscencoding.la \ + $(top_builddir)/lib/libmiscutil.la \ + $(NETTLELIB) \ + $(SSLLIB) \ + $(KRB5LIBS) \ + $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) +tests_testURL_LDFLAGS = $(LIBADD_DL) + +## Tests of dns/* + +check_PROGRAMS += tests/testDns +tests_testDns_SOURCES= \ + tests/testRFC1035.cc \ + tests/testRFC1035.h +nodist_tests_testDns_SOURCES= \ + tests/stub_debug.cc \ + tests/stub_libmem.cc \ + tests/stub_SBuf.cc \ + tests/stub_tools.cc +tests_testDns_LDADD= \ + dns/libdns.la \ + base/libbase.la \ + $(top_builddir)/lib/libmiscutil.la \ + $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) +tests_testDns_LDFLAGS= $(LIBADD_DL) + +## Tests of parser/* + +check_PROGRAMS += tests/testTokenizer +tests_testTokenizer_SOURCES = \ + tests/testTokenizer.h \ + tests/testTokenizer.cc +nodist_tests_testTokenizer_SOURCES = \ + parser/Tokenizer.h \ + SquidString.h \ + String.cc \ + $(TESTSOURCES) \ + tests/stub_debug.cc \ + tests/stub_libmem.cc \ + tests/stub_time.cc \ + tests/stub_SBufDetailedStats.cc +tests_testTokenizer_LDADD = \ + parser/libparser.la \ + base/libbase.la \ + sbuf/libsbuf.la \ + $(top_builddir)/lib/libmiscutil.la \ + $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) +tests_testTokenizer_LDFLAGS = $(LIBADD_DL) + +## Tests of sbuf/* and String handling objects + +check_PROGRAMS += tests/testSBuf +tests_testSBuf_SOURCES= \ + tests/testSBuf.h \ + tests/testSBuf.cc \ + tests/SBufFindTest.h \ + tests/SBufFindTest.cc \ + tests/stub_SBufDetailedStats.cc \ + tests/stub_time.cc \ + tests/stub_debug.cc \ + tests/stub_fatal.cc \ + tests/stub_libmem.cc +nodist_tests_testSBuf_SOURCES=$(TESTSOURCES) +tests_testSBuf_LDADD= \ + sbuf/libsbuf.la \ + base/libbase.la \ + $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) +tests_testSBuf_LDFLAGS = $(LIBADD_DL) + +check_PROGRAMS += tests/testSBufList +tests_testSBufList_SOURCES= \ + tests/testSBufList.h \ + tests/testSBufList.cc \ + tests/stub_SBufDetailedStats.cc \ + tests/stub_time.cc \ + tests/stub_debug.cc \ + tests/stub_fatal.cc \ + tests/stub_libmem.cc +nodist_tests_testSBufList_SOURCES=$(TESTSOURCES) +tests_testSBufList_LDADD=\ + sbuf/libsbuf.la \ + base/libbase.la \ + $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) +tests_testSBufList_LDFLAGS = $(LIBADD_DL) + +check_PROGRAMS += tests/testString +## string needs mem.cc. +## mem.cc needs ClientInfo.h +## libsquid pulls in SquidConfig and children. stub them. +tests_testString_SOURCES = \ + ClientInfo.h \ + MemBuf.cc \ + String.cc \ + tests/stub_SBufDetailedStats.cc \ + tests/testString.cc \ + tests/testString.h \ + cache_cf.h \ + tests/stub_cache_cf.cc \ + tests/stub_cache_manager.cc \ + tests/stub_cbdata.cc \ + tests/stub_debug.cc \ + tests/stub_HelperChildConfig.cc \ + tests/stub_libmem.cc \ + tools.h \ + tests/stub_tools.cc \ + tests/stub_time.cc \ + wordlist.h \ + wordlist.cc +nodist_tests_testString_SOURCES = \ + $(TESTSOURCES) +tests_testString_LDADD = \ + base/libbase.la \ + libsquid.la \ + ip/libip.la \ sbuf/libsbuf.la \ - $(top_builddir)/lib/libmisccontainers.la \ - $(top_builddir)/lib/libmiscencoding.la \ $(top_builddir)/lib/libmiscutil.la \ - $(NETTLELIB) \ $(REGEXLIB) \ $(SSLLIB) \ - $(KRB5LIBS) \ $(LIBCPPUNIT_LIBS) \ $(COMPAT_LIB) \ $(XTRA_LIBS) -tests_testCacheManager_LDFLAGS = $(LIBADD_DL) +tests_testString_LDFLAGS = $(LIBADD_DL) -tests_testDiskIO_SOURCES = \ +## Tests of fs/* + +if ENABLE_FS_ROCK +check_PROGRAMS += tests/testRock +tests_testRock_SOURCES = \ AccessLogEntry.cc \ AccessLogEntry.h \ + cbdata.cc \ CacheDigest.h \ + CollapsedForwarding.h \ + CollapsedForwarding.cc \ tests/stub_CacheDigest.cc \ - cbdata.cc \ - client_db.h \ - ClientInfo.h \ - tests/stub_CollapsedForwarding.cc \ ConfigOption.cc \ ConfigParser.cc \ - $(DELAY_POOL_SOURCE) \ - FadingCounter.cc \ fs_io.h \ fs_io.cc \ - tests/stub_ETag.cc \ + ETag.cc \ EventLoop.cc \ event.cc \ + FadingCounter.cc \ fatal.h \ - tests/stub_fatal.cc \ + fatal.cc \ fd.h \ fd.cc \ fde.h \ fde.cc \ FileMap.h \ filemap.cc \ + HttpHeaderFieldStat.h \ HttpBody.h \ HttpBody.cc \ - HttpHeaderFieldStat.h \ - HttpHdrCc.h \ HttpHdrCc.cc \ HttpHdrContRange.cc \ + HttpHdrRange.cc \ HttpHdrSc.cc \ HttpHdrScTarget.cc \ - HttpHdrRange.cc \ + HttpHeader.h \ + HttpHeader.cc \ HttpHeaderFieldInfo.h \ HttpHeaderTools.h \ HttpHeaderTools.cc \ - HttpHeader.h \ - HttpHeader.cc \ HttpReply.cc \ int.h \ int.cc \ @@ -1472,120 +1419,290 @@ tests_testDiskIO_SOURCES = \ MasterXaction.h \ MemBuf.cc \ MemObject.cc \ + MemStore.cc \ mem_node.cc \ Notes.h \ Notes.cc \ Parsing.cc \ - refresh.h \ - refresh.cc \ RemovalPolicy.cc \ - RequestFlags.h \ RequestFlags.cc \ - tests/stub_libsecurity.cc \ + RequestFlags.h \ StatCounters.h \ StatCounters.cc \ StatHist.h \ tests/stub_StatHist.cc \ stmem.cc \ - tests/stub_SBufDetailedStats.cc \ + repl_modules.h \ + tests/stub_stat.cc \ + store.cc \ StoreFileSystem.cc \ StoreIOState.cc \ - tests/stub_StoreMeta.cc \ StoreMetaUnpacker.cc \ + $(STOREMETA_SOURCE) \ StoreSwapLogData.cc \ store_io.cc \ store_key_md5.h \ store_key_md5.cc \ - store_swapout.cc \ store_swapmeta.cc \ - repl_modules.h \ - store.cc \ + store_swapout.cc \ + tests/stub_SBufDetailedStats.cc \ String.cc \ StrList.h \ StrList.cc \ - tests/stub_SwapDir.cc \ + Transients.h \ Transients.cc \ + tests/testRock.cc \ + tests/testRock.h \ + tests/testStoreSupport.cc \ + tests/testStoreSupport.h \ log/access_log.h \ tests/stub_access_log.cc \ - tests/stub_acl.cc \ cache_cf.h \ tests/stub_cache_cf.cc \ + client_db.h \ tests/stub_cache_manager.cc \ tests/stub_client_db.cc \ - client_side_request.h \ tests/stub_client_side_request.cc \ tests/stub_debug.cc \ tests/stub_errorpage.cc \ - tests/stub_helper.cc \ tests/stub_HelperChildConfig.cc \ - tests/stub_HttpRequest.cc \ tests/stub_http.cc \ + tests/stub_HttpRequest.cc \ + tests/stub_libauth.cc \ tests/stub_icp.cc \ - internal.h \ - tests/stub_internal.cc \ tests/stub_ipc.cc \ tests/stub_ipcache.cc \ - tests/stub_libauth_acls.cc \ - tests/stub_libauth.cc \ tests/stub_libeui.cc \ tests/stub_libformat.cc \ tests/stub_libicmp.cc \ tests/stub_liblog.cc \ - tests/stub_MemStore.cc \ + tests/stub_libmgr.cc \ + tests/stub_libsecurity.cc \ mime.h \ tests/stub_mime.cc \ tests/stub_neighbors.cc \ - tests/stub_pconn.cc \ tests/stub_Port.cc \ - tests/stub_stat.cc \ + tests/stub_pconn.cc \ tests/stub_store_client.cc \ - tests/stub_store_stats.cc \ store_rebuild.h \ tests/stub_store_rebuild.cc \ + tests/stub_store_stats.cc \ + tools.h \ + tests/stub_tools.cc \ + time.cc \ + tests/stub_libanyp.cc \ + wordlist.h \ + wordlist.cc \ + $(DELAY_POOL_SOURCE) \ + $(UNLINKDSOURCE) +nodist_tests_testRock_SOURCES = \ + $(TESTSOURCES) \ + hier_code.cc \ + SquidMath.cc \ + SquidMath.h \ + swap_log_op.cc +tests_testRock_LDADD = \ + http/libhttp.la \ + parser/libparser.la \ + libsquid.la \ + comm/libcomm.la \ + ip/libip.la \ + fs/libfs.la \ + $(COMMON_LIBS) \ + $(REPL_OBJS) \ + DiskIO/libdiskio.la \ + acl/libacls.la \ + acl/libapi.la \ + acl/libstate.la \ + anyp/libanyp.la \ + eui/libeui.la \ + $(SSL_LIBS) \ + ipc/libipc.la \ + base/libbase.la \ + mem/libmem.la \ + store/libstore.la \ + $(ADAPTATION_LIBS) \ + sbuf/libsbuf.la \ + $(top_builddir)/lib/libmisccontainers.la \ + $(top_builddir)/lib/libmiscencoding.la \ + $(top_builddir)/lib/libmiscutil.la \ + $(NETTLELIB) \ + $(REGEXLIB) \ + $(SSLLIB) \ + $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) +tests_testRock_LDFLAGS = $(AM_CPPFLAGS) $(LIBADD_DL) +else +EXTRA_DIST += \ + tests/testRock.cc \ + tests/testRock.h \ + tests/testStoreSupport.cc \ + tests/testStoreSupport.h +endif + +if ENABLE_FS_UFS +check_PROGRAMS += tests/testUfs +tests_testUfs_SOURCES = \ + AccessLogEntry.cc \ + AccessLogEntry.h \ + tests/testUfs.cc \ + tests/testUfs.h \ + tests/stub_cache_manager.cc \ + tests/stub_client_db.cc \ + tests/stub_CollapsedForwarding.cc \ + tests/stub_HelperChildConfig.cc \ + tests/stub_icp.cc \ + tests/stub_ipc.cc \ + tests/stub_ipcache.cc \ + tests/stub_libeui.cc \ + tests/stub_libicmp.cc \ + tests/stub_liblog.cc \ + tests/stub_neighbors.cc \ + tests/stub_pconn.cc \ + tests/stub_Port.cc \ tests/stub_UdsOp.cc \ - tests/testDiskIO.cc \ - tests/testDiskIO.h \ + internal.h \ + tests/stub_internal.cc \ + tests/stub_libformat.cc \ + tests/stub_libsecurity.cc \ + tests/stub_stat.cc \ + store_rebuild.h \ + tests/stub_store_rebuild.cc \ + tests/stub_store_stats.cc \ + fatal.h \ + tests/stub_fatal.cc \ + fd.h \ + fd.cc \ + fde.h \ + fde.cc \ + client_db.h \ + FadingCounter.cc \ + fs_io.h \ + fs_io.cc \ + FileMap.h \ + filemap.cc \ + HttpBody.h \ + HttpBody.cc \ + HttpReply.cc \ + int.h \ + int.cc \ + LogTags.cc \ + RequestFlags.h \ + RequestFlags.cc \ + Transients.cc \ + MasterXaction.cc \ + MasterXaction.h \ + MemObject.cc \ + MemStore.cc \ + Notes.h \ + Notes.cc \ + StoreSwapLogData.cc \ + StoreIOState.cc \ + StoreMetaUnpacker.cc \ + $(STOREMETA_SOURCE) \ + StoreFileSystem.cc \ + store_io.cc \ + store_swapout.cc \ + store_swapmeta.cc \ + $(UNLINKDSOURCE) \ + $(WIN32_SOURCE) \ + event.cc \ + $(DELAY_POOL_SOURCE) \ + CacheDigest.h \ + tests/stub_CacheDigest.cc \ + ConfigParser.cc \ + EventLoop.cc \ + RemovalPolicy.cc \ + repl_modules.h \ + store.cc \ + store_key_md5.h \ + store_key_md5.cc \ + Parsing.cc \ + ConfigOption.cc \ + tests/stub_acl.cc \ + cache_cf.h \ + tests/stub_cache_cf.cc \ + tests/stub_helper.cc \ + cbdata.cc \ + tests/stub_SBufDetailedStats.cc \ + String.cc \ + tests/stub_debug.cc \ + tests/stub_client_side_request.cc \ + tests/stub_http.cc \ + tests/stub_libauth.cc \ + mem_node.cc \ + stmem.cc \ + mime.h \ + tests/stub_mime.cc \ + HttpHeaderFieldInfo.h \ + HttpHeaderTools.h \ + HttpHeaderTools.cc \ + HttpHeader.h \ + HttpHeader.cc \ + ClientInfo.h \ + MemBuf.cc \ + HttpHdrContRange.cc \ + HttpHeaderFieldStat.h \ + HttpHdrCc.h \ + HttpHdrCc.cc \ + HttpHdrSc.cc \ + HttpHdrScTarget.cc \ + tests/stub_libanyp.cc \ + StatCounters.h \ + StatCounters.cc \ + StatHist.h \ + StatHist.cc \ + StrList.h \ + StrList.cc \ + HttpHdrRange.cc \ + ETag.cc \ + tests/stub_errorpage.cc \ + tests/stub_HttpRequest.cc \ + log/access_log.h \ + tests/stub_access_log.cc \ + refresh.h \ + refresh.cc \ + tests/stub_store_client.cc \ + tools.h \ + tests/stub_tools.cc \ tests/testStoreSupport.cc \ tests/testStoreSupport.h \ - tests/stub_time.cc \ - $(UNLINKDSOURCE) \ - tests/stub_libanyp.cc \ - $(WIN32_SOURCE) \ + time.cc \ wordlist.h \ - wordlist.cc \ - tools.h \ - tests/stub_tools.cc -nodist_tests_testDiskIO_SOURCES= \ + wordlist.cc +nodist_tests_testUfs_SOURCES = \ $(TESTSOURCES) \ hier_code.cc \ SquidMath.cc \ SquidMath.h \ swap_log_op.cc -tests_testDiskIO_LDADD = \ - libsquid.la \ +tests_testUfs_LDADD = \ http/libhttp.la \ parser/libparser.la \ - SquidConfig.o \ CommCalls.o \ ident/libident.la \ acl/libacls.la \ acl/libstate.la \ - comm/libcomm.la \ + acl/libapi.la \ + libsquid.la \ ip/libip.la \ fs/libfs.la \ - ipc/libipc.la \ + mgr/libmgr.la \ $(REPL_OBJS) \ - $(ADAPTATION_LIBS) \ + acl/libacls.la \ DiskIO/libdiskio.la \ acl/libapi.la \ anyp/libanyp.la \ - mgr/libmgr.la \ $(SSL_LIBS) \ ipc/libipc.la \ + comm/libcomm.la \ dns/libdns.la \ base/libbase.la \ + ip/libip.la \ mem/libmem.la \ store/libstore.la \ + $(ADAPTATION_LIBS) \ sbuf/libsbuf.la \ $(top_builddir)/lib/libmisccontainers.la \ $(top_builddir)/lib/libmiscencoding.la \ @@ -1596,98 +1713,36 @@ tests_testDiskIO_LDADD = \ $(LIBCPPUNIT_LIBS) \ $(COMPAT_LIB) \ $(XTRA_LIBS) -tests_testDiskIO_LDFLAGS = $(LIBADD_DL) -tests_testDiskIO_DEPENDENCIES = \ - DiskIO/libdiskio.la \ - $(SWAP_TEST_DS) +tests_testUfs_LDFLAGS = $(LIBADD_DL) +else +EXTRA_DIST += \ + tests/testUfs.cc \ + tests/testUfs.h +endif -tests_testDns_SOURCES= \ - tests/testRFC1035.cc \ - tests/testRFC1035.h -nodist_tests_testDns_SOURCES= \ - tests/stub_debug.cc \ - tests/stub_libmem.cc \ - tests/stub_SBuf.cc \ - tests/stub_tools.cc -tests_testDns_LDADD= \ - dns/libdns.la \ - base/libbase.la \ - $(top_builddir)/lib/libmiscutil.la \ - $(LIBCPPUNIT_LIBS) \ - $(COMPAT_LIB) \ - $(XTRA_LIBS) -tests_testDns_LDFLAGS= $(LIBADD_DL) +## Tests of store/* and Store objects -tests_testEvent_SOURCES = \ - AccessLogEntry.cc \ - BodyPipe.cc \ +check_PROGRAMS += tests/testStore +## why so many sources? well httpHeaderTools requites ACLChecklist & friends. +## first line - what we are testing. +tests_testStore_SOURCES= \ CacheDigest.h \ tests/stub_CacheDigest.cc \ - cache_cf.h \ - AuthReg.h \ - RefreshPattern.h \ - cache_cf.cc \ - CachePeer.cc \ - CachePeer.h \ - cache_manager.cc \ - carp.h \ - tests/stub_carp.cc \ cbdata.cc \ - client_db.h \ - client_db.cc \ - client_side.h \ - client_side.cc \ - client_side_reply.cc \ - client_side_request.cc \ ClientInfo.h \ - clientStream.cc \ tests/stub_CollapsedForwarding.cc \ ConfigOption.cc \ ConfigParser.cc \ - CpuAffinityMap.cc \ - CpuAffinityMap.h \ - CpuAffinitySet.cc \ - CpuAffinitySet.h \ - debug.cc \ $(DELAY_POOL_SOURCE) \ fs_io.h \ fs_io.cc \ - dlink.h \ - dlink.cc \ - $(DNSSOURCE) \ - errorpage.cc \ - tests/stub_ETag.cc \ + ETag.cc \ event.cc \ - EventLoop.h \ EventLoop.cc \ - external_acl.cc \ - ExternalACLEntry.cc \ - FadingCounter.cc \ fatal.h \ tests/stub_fatal.cc \ - fd.h \ - fd.cc \ - fde.cc \ FileMap.h \ filemap.cc \ - fqdncache.h \ - fqdncache.cc \ - FwdState.cc \ - FwdState.h \ - gopher.h \ - gopher.cc \ - helper.cc \ - hier_code.h \ - $(HTCPSOURCE) \ - http.cc \ - HttpBody.h \ - HttpBody.cc \ - tests/stub_HttpControlMsg.cc \ - HttpHeader.h \ - HttpHeader.cc \ - HttpHeaderFieldInfo.h \ - HttpHeaderTools.h \ - HttpHeaderTools.cc \ HttpHeaderFieldStat.h \ HttpHdrCc.h \ HttpHdrCc.cc \ @@ -1695,64 +1750,27 @@ tests_testEvent_SOURCES = \ HttpHdrRange.cc \ HttpHdrSc.cc \ HttpHdrScTarget.cc \ - HttpReply.cc \ - PeerPoolMgr.h \ - PeerPoolMgr.cc \ - RequestFlags.h \ + HttpHeaderFieldInfo.h \ + HttpHeaderTools.h \ + HttpHeaderTools.cc \ + HttpHeader.h \ + HttpHeader.cc \ RequestFlags.cc \ - HttpRequest.cc \ - icp_v2.cc \ - icp_v3.cc \ - $(IPC_SOURCE) \ - ipcache.cc \ + RequestFlags.h \ int.h \ int.cc \ - internal.h \ - internal.cc \ - LogTags.cc \ - tests/stub_libsecurity.cc \ MasterXaction.cc \ MasterXaction.h \ - tests/stub_libmem.cc \ mem_node.cc \ MemBuf.cc \ MemObject.cc \ - mime.h \ - mime.cc \ - mime_header.h \ - mime_header.cc \ - multicast.h \ - multicast.cc \ - neighbors.h \ - neighbors.cc \ - Notes.cc \ + MemStore.cc \ Notes.h \ + Notes.cc \ Parsing.cc \ - pconn.cc \ - peer_digest.cc \ - peer_proxy_negotiate_auth.h \ - peer_proxy_negotiate_auth.cc \ - peer_select.cc \ - peer_sourcehash.h \ - peer_sourcehash.cc \ - peer_userhash.h \ - peer_userhash.cc \ - Pipeline.cc \ - Pipeline.h \ - redirect.h \ - tests/stub_redirect.cc \ + RemovalPolicy.cc \ refresh.h \ refresh.cc \ - RemovalPolicy.cc \ - StrList.h \ - StrList.cc \ - tests/stub_SBufDetailedStats.cc \ - $(SNMP_SOURCE) \ - SquidMath.cc \ - SquidMath.h \ - IoStats.h \ - stat.h \ - stat.cc \ StatCounters.h \ StatCounters.cc \ StatHist.h \ @@ -1760,61 +1778,82 @@ tests_testEvent_SOURCES = \ stmem.cc \ repl_modules.h \ store.cc \ - store_client.cc \ - store_digest.h \ - tests/stub_store_digest.cc \ store_io.cc \ - store_key_md5.h \ - store_key_md5.cc \ - store_log.h \ - store_log.cc \ - store_rebuild.h \ - store_rebuild.cc \ - store_swapin.h \ - store_swapin.cc \ - store_swapmeta.cc \ store_swapout.cc \ - StoreFileSystem.cc \ StoreIOState.cc \ tests/stub_StoreMeta.cc \ StoreMetaUnpacker.cc \ StoreSwapLogData.cc \ + store_key_md5.h \ + store_key_md5.cc \ + tests/stub_SBufDetailedStats.cc \ String.cc \ - tests/stub_SwapDir.cc \ + StrList.h \ + StrList.cc \ tests/CapturingStoreEntry.h \ - tests/testEvent.cc \ - tests/testEvent.h \ - tests/stub_main_cc.cc \ - tests/stub_ipc_Forwarder.cc \ - tests/stub_libauth_acls.cc \ + log/access_log.h \ + tests/stub_access_log.cc \ + tests/stub_acl.cc \ + cache_cf.h \ + tests/stub_cache_cf.cc \ + tests/stub_cache_manager.cc \ + tests/stub_client_side_request.cc \ + tests/stub_comm.cc \ + tests/stub_debug.cc \ + tests/stub_errorpage.cc \ + fd.h \ + fde.h \ + tests/stub_fd.cc \ + tests/stub_helper.cc \ + tests/stub_HelperChildConfig.cc \ + tests/stub_http.cc \ tests/stub_libauth.cc \ - tests/stub_libdiskio.cc \ tests/stub_libeui.cc \ + tests/stub_libdiskio.cc \ + tests/stub_libformat.cc \ + tests/stub_libsecurity.cc \ + tests/stub_libsslsquid.cc \ + HttpBody.h \ + HttpBody.cc \ + tests/stub_HttpReply.cc \ + tests/stub_HttpRequest.cc \ + tests/stub_libcomm.cc \ + mime.h \ + tests/stub_mime.cc \ + tests/stub_Port.cc \ + tests/stub_stat.cc \ + tests/stub_store_client.cc \ tests/stub_store_stats.cc \ - time.cc \ + store_rebuild.h \ + tests/stub_store_rebuild.cc \ + tests/stub_store_swapout.cc \ tools.h \ - tools.cc \ Transients.cc \ - tests/stub_tunnel.cc \ - MemStore.cc \ - $(UNLINKDSOURCE) \ - urn.h \ - urn.cc \ - wccp2.h \ - tests/stub_wccp2.cc \ - whois.h \ - tests/stub_whois.cc \ - $(WIN32_SOURCE) \ + tests/stub_tools.cc \ + tests/stub_UdsOp.cc \ + tests/testPackableStream.cc \ + tests/testPackableStream.h \ + tests/testStore.cc \ + tests/testStore.h \ + tests/testStoreController.cc \ + tests/testStoreController.h \ + tests/testStoreHashIndex.cc \ + tests/testStoreHashIndex.h \ + tests/testStoreSupport.cc \ + tests/testStoreSupport.h \ + tests/TestSwapDir.cc \ + tests/TestSwapDir.h \ + tests/stub_time.cc \ + tests/stub_libanyp.cc \ wordlist.h \ wordlist.cc -nodist_tests_testEvent_SOURCES = \ - $(BUILT_SOURCES) -tests_testEvent_LDADD = \ +nodist_tests_testStore_SOURCES= \ + SquidMath.cc \ + SquidMath.h \ + swap_log_op.cc \ + $(TESTSOURCES) +tests_testStore_LDADD= \ libsquid.la \ - clients/libclients.la \ - servers/libservers.la \ - ftp/libftp.la \ - helper/libhelper.la \ http/libhttp.la \ parser/libparser.la \ ident/libident.la \ @@ -1825,265 +1864,334 @@ tests_testEvent_LDADD = \ base/libbase.la \ ip/libip.la \ fs/libfs.la \ + mgr/libmgr.la \ + ipc/libipc.la \ anyp/libanyp.la \ - icmp/libicmp.la \ - comm/libcomm.la \ - log/liblog.la \ - format/libformat.la \ - $(REPL_OBJS) \ - $(ADAPTATION_LIBS) \ - $(ESI_LIBS) \ - $(SSL_LIBS) \ + mem/libmem.la \ + store/libstore.la \ + sbuf/libsbuf.la \ + DiskIO/libdiskio.la \ $(top_builddir)/lib/libmisccontainers.la \ $(top_builddir)/lib/libmiscencoding.la \ $(top_builddir)/lib/libmiscutil.la \ - ipc/libipc.la \ - mgr/libmgr.la \ - store/libstore.la \ - sbuf/libsbuf.la \ - $(SNMP_LIBS) \ $(NETTLELIB) \ $(REGEXLIB) \ $(SSLLIB) \ - $(KRB5LIBS) \ + CommCalls.o \ $(LIBCPPUNIT_LIBS) \ $(COMPAT_LIB) \ $(XTRA_LIBS) -tests_testEvent_LDFLAGS = $(LIBADD_DL) +tests_testStore_LDFLAGS = $(LIBADD_DL) -## Tests of the EventLoop module. -tests_testEventLoop_SOURCES = \ +## Tests of DiskIO/* + +check_PROGRAMS += tests/testDiskIO +tests_testDiskIO_SOURCES = \ AccessLogEntry.cc \ - BodyPipe.cc \ + AccessLogEntry.h \ CacheDigest.h \ tests/stub_CacheDigest.cc \ - cache_manager.cc \ - cache_cf.h \ - AuthReg.h \ - RefreshPattern.h \ - cache_cf.cc \ - CachePeer.cc \ - CachePeer.h \ - carp.h \ - tests/stub_carp.cc \ cbdata.cc \ client_db.h \ - client_db.cc \ - client_side.h \ - client_side.cc \ - client_side_reply.cc \ - client_side_request.cc \ ClientInfo.h \ - clientStream.cc \ tests/stub_CollapsedForwarding.cc \ ConfigOption.cc \ ConfigParser.cc \ - CpuAffinityMap.cc \ - CpuAffinityMap.h \ - CpuAffinitySet.cc \ - CpuAffinitySet.h \ - debug.cc \ $(DELAY_POOL_SOURCE) \ + FadingCounter.cc \ fs_io.h \ fs_io.cc \ - dlink.h \ - dlink.cc \ - $(DNSSOURCE) \ - errorpage.cc \ tests/stub_ETag.cc \ - EventLoop.h \ EventLoop.cc \ event.cc \ - external_acl.cc \ - ExternalACLEntry.cc \ - FadingCounter.cc \ fatal.h \ tests/stub_fatal.cc \ fd.h \ fd.cc \ + fde.h \ fde.cc \ FileMap.h \ filemap.cc \ - fqdncache.h \ - fqdncache.cc \ - FwdState.cc \ - FwdState.h \ - gopher.h \ - gopher.cc \ - helper.cc \ - hier_code.h \ - $(HTCPSOURCE) \ - http.cc \ HttpBody.h \ HttpBody.cc \ - tests/stub_HttpControlMsg.cc \ - HttpHeader.h \ - HttpHeader.cc \ - HttpHeaderFieldInfo.h \ - HttpHeaderTools.h \ - HttpHeaderTools.cc \ HttpHeaderFieldStat.h \ HttpHdrCc.h \ HttpHdrCc.cc \ HttpHdrContRange.cc \ - HttpHdrRange.cc \ HttpHdrSc.cc \ HttpHdrScTarget.cc \ + HttpHdrRange.cc \ + HttpHeaderFieldInfo.h \ + HttpHeaderTools.h \ + HttpHeaderTools.cc \ + HttpHeader.h \ + HttpHeader.cc \ HttpReply.cc \ - PeerPoolMgr.h \ - PeerPoolMgr.cc \ - RequestFlags.h \ - RequestFlags.cc \ - HttpRequest.cc \ - icp_v2.cc \ - icp_v3.cc \ - $(IPC_SOURCE) \ - ipcache.cc \ int.h \ int.cc \ - internal.h \ - internal.cc \ LogTags.cc \ MasterXaction.cc \ MasterXaction.h \ MemBuf.cc \ MemObject.cc \ - tests/stub_libmem.cc \ mem_node.cc \ - mime.h \ - mime.cc \ - mime_header.h \ - mime_header.cc \ - multicast.h \ - multicast.cc \ - neighbors.h \ - neighbors.cc \ - Notes.cc \ Notes.h \ + Notes.cc \ Parsing.cc \ - pconn.cc \ - peer_digest.cc \ - peer_proxy_negotiate_auth.h \ - peer_proxy_negotiate_auth.cc \ - peer_select.cc \ - peer_sourcehash.h \ - peer_sourcehash.cc \ - peer_userhash.h \ - peer_userhash.cc \ - Pipeline.cc \ - Pipeline.h \ - RemovalPolicy.cc \ - redirect.h \ - tests/stub_redirect.cc \ refresh.h \ refresh.cc \ + RemovalPolicy.cc \ + RequestFlags.h \ + RequestFlags.cc \ + tests/stub_libsecurity.cc \ + StatCounters.h \ + StatCounters.cc \ + StatHist.h \ + tests/stub_StatHist.cc \ + stmem.cc \ tests/stub_SBufDetailedStats.cc \ - $(SNMP_SOURCE) \ + StoreFileSystem.cc \ + StoreIOState.cc \ + tests/stub_StoreMeta.cc \ + StoreMetaUnpacker.cc \ + StoreSwapLogData.cc \ + store_io.cc \ + store_key_md5.h \ + store_key_md5.cc \ + store_swapout.cc \ + store_swapmeta.cc \ + repl_modules.h \ + store.cc \ + String.cc \ + StrList.h \ + StrList.cc \ + tests/stub_SwapDir.cc \ + Transients.cc \ + log/access_log.h \ + tests/stub_access_log.cc \ + tests/stub_acl.cc \ + cache_cf.h \ + tests/stub_cache_cf.cc \ + tests/stub_cache_manager.cc \ + tests/stub_client_db.cc \ + client_side_request.h \ + tests/stub_client_side_request.cc \ + tests/stub_debug.cc \ + tests/stub_errorpage.cc \ + tests/stub_helper.cc \ + tests/stub_HelperChildConfig.cc \ + tests/stub_HttpRequest.cc \ + tests/stub_http.cc \ + tests/stub_icp.cc \ + internal.h \ + tests/stub_internal.cc \ + tests/stub_ipc.cc \ + tests/stub_ipcache.cc \ + tests/stub_libauth_acls.cc \ + tests/stub_libauth.cc \ + tests/stub_libeui.cc \ + tests/stub_libformat.cc \ + tests/stub_libicmp.cc \ + tests/stub_liblog.cc \ + tests/stub_MemStore.cc \ + mime.h \ + tests/stub_mime.cc \ + tests/stub_neighbors.cc \ + tests/stub_pconn.cc \ + tests/stub_Port.cc \ + tests/stub_stat.cc \ + tests/stub_store_client.cc \ + tests/stub_store_stats.cc \ + store_rebuild.h \ + tests/stub_store_rebuild.cc \ + tests/stub_UdsOp.cc \ + tests/testDiskIO.cc \ + tests/testDiskIO.h \ + tests/testStoreSupport.cc \ + tests/testStoreSupport.h \ + tests/stub_time.cc \ + $(UNLINKDSOURCE) \ + tests/stub_libanyp.cc \ + $(WIN32_SOURCE) \ + wordlist.h \ + wordlist.cc \ + tools.h \ + tests/stub_tools.cc +nodist_tests_testDiskIO_SOURCES= \ + $(TESTSOURCES) \ + hier_code.cc \ + SquidMath.cc \ SquidMath.h \ + swap_log_op.cc +tests_testDiskIO_LDADD = \ + libsquid.la \ + http/libhttp.la \ + parser/libparser.la \ + SquidConfig.o \ + CommCalls.o \ + ident/libident.la \ + acl/libacls.la \ + acl/libstate.la \ + comm/libcomm.la \ + ip/libip.la \ + fs/libfs.la \ + ipc/libipc.la \ + $(REPL_OBJS) \ + $(ADAPTATION_LIBS) \ + DiskIO/libdiskio.la \ + acl/libapi.la \ + anyp/libanyp.la \ + mgr/libmgr.la \ + $(SSL_LIBS) \ + ipc/libipc.la \ + dns/libdns.la \ + base/libbase.la \ + mem/libmem.la \ + store/libstore.la \ + sbuf/libsbuf.la \ + $(top_builddir)/lib/libmisccontainers.la \ + $(top_builddir)/lib/libmiscencoding.la \ + $(top_builddir)/lib/libmiscutil.la \ + $(NETTLELIB) \ + $(REGEXLIB) \ + $(SSLLIB) \ + $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) +tests_testDiskIO_LDFLAGS = $(LIBADD_DL) + +## Tests of auth/* + +tests_testACLMaxUserIP_SOURCES= \ + cbdata.cc \ + ClientInfo.h \ + tests/stub_CollapsedForwarding.cc \ + ConfigOption.cc \ + ConfigParser.cc \ + tests/stub_ETag.cc \ + event.cc \ + fatal.h \ + tests/stub_fatal.cc \ + FileMap.h \ + filemap.cc \ + HttpBody.cc \ + HttpHeader.h \ + HttpHeader.cc \ + HttpHeaderFieldInfo.h \ + HttpHeaderTools.h \ + HttpHeaderTools.cc \ + HttpHdrContRange.cc \ + HttpHdrRange.cc \ + HttpHeaderFieldStat.h \ + HttpHdrCc.h \ + HttpHdrCc.cc \ + HttpHdrSc.cc \ + HttpHdrScTarget.cc \ + int.h \ + int.cc \ + MasterXaction.cc \ + MasterXaction.h \ + Notes.cc \ + Notes.h \ + mem_node.cc \ + Parsing.cc \ + tests/stub_libsecurity.cc \ SquidMath.cc \ - IoStats.h \ - stat.h \ - stat.cc \ - StatCounters.h \ StatCounters.cc \ + StatCounters.h \ StatHist.h \ - StatHist.cc \ + StrList.h \ + StrList.cc \ + tests/stub_StatHist.cc \ stmem.cc \ - repl_modules.h \ - store.cc \ - store_client.cc \ - store_digest.h \ - tests/stub_store_digest.cc \ - store_io.cc \ - store_key_md5.h \ - store_key_md5.cc \ - store_log.h \ - store_log.cc \ - store_rebuild.h \ - store_rebuild.cc \ - store_swapin.h \ - store_swapin.cc \ - store_swapmeta.cc \ - store_swapout.cc \ - StoreFileSystem.cc \ + tests/stub_SBufDetailedStats.cc \ + String.cc \ StoreIOState.cc \ tests/stub_StoreMeta.cc \ StoreMetaUnpacker.cc \ StoreSwapLogData.cc \ - String.cc \ - StrList.h \ - StrList.cc \ + store_key_md5.h \ + store_key_md5.cc \ + swap_log_op.cc \ + swap_log_op.h \ tests/stub_SwapDir.cc \ - tests/testEventLoop.cc \ - tests/testEventLoop.h \ - tests/stub_main_cc.cc \ - tests/stub_ipc_Forwarder.cc \ - tests/stub_libauth_acls.cc \ + Transients.cc \ + log/access_log.h \ + tests/stub_access_log.cc \ + cache_cf.h \ + tests/stub_cache_cf.cc \ + tests/stub_client_side.cc \ + tests/stub_debug.cc \ + tests/stub_DelayId.cc \ + tests/stub_errorpage.cc \ + fd.h \ + tests/stub_fd.cc \ + tests/stub_HttpRequest.cc \ + tests/stub_HttpReply.cc \ + tests/stub_ipc_TypedMsgHdr.cc \ tests/stub_libauth.cc \ + tests/stub_libcomm.cc \ tests/stub_libdiskio.cc \ - tests/stub_libeui.cc \ - tests/stub_libsecurity.cc \ + tests/stub_libformat.cc \ + tests/stub_libmem.cc \ + tests/stub_libsslsquid.cc \ + tests/stub_MemObject.cc \ + tests/stub_MemStore.cc \ + mime.h \ + tests/stub_mime.cc \ + tests/stub_pconn.cc \ + tests/stub_Port.cc \ + repl_modules.h \ + tests/stub_store.cc \ + tests/stub_store_client.cc \ + store_rebuild.h \ + tests/stub_store_rebuild.cc \ tests/stub_store_stats.cc \ - time.cc \ + tests/stub_store_swapout.cc \ tools.h \ - tools.cc \ - Transients.cc \ - tests/stub_tunnel.cc \ - MemStore.cc \ - $(UNLINKDSOURCE) \ - urn.h \ - urn.cc \ - wccp2.h \ - tests/stub_wccp2.cc \ - whois.h \ - tests/stub_whois.cc \ - $(WIN32_SOURCE) \ + tests/stub_tools.cc \ + tests/stub_cache_manager.cc \ + tests/stub_UdsOp.cc \ + tests/testACLMaxUserIP.cc \ + tests/testACLMaxUserIP.h \ + tests/stub_time.cc \ + tests/stub_libanyp.cc \ + MemBuf.cc \ wordlist.h \ wordlist.cc -nodist_tests_testEventLoop_SOURCES = \ - $(BUILT_SOURCES) -tests_testEventLoop_LDADD = \ +nodist_tests_testACLMaxUserIP_SOURCES= \ + $(TESTSOURCES) +tests_testACLMaxUserIP_LDADD= \ libsquid.la \ - clients/libclients.la \ - servers/libservers.la \ - ftp/libftp.la \ helper/libhelper.la \ http/libhttp.la \ parser/libparser.la \ + $(AUTH_ACL_LIBS) \ ident/libident.la \ acl/libacls.la \ + eui/libeui.la \ acl/libstate.la \ acl/libapi.la \ - dns/libdns.la \ + anyp/libanyp.la \ base/libbase.la \ ip/libip.la \ - fs/libfs.la \ - anyp/libanyp.la \ - icmp/libicmp.la \ - comm/libcomm.la \ - log/liblog.la \ - format/libformat.la \ - $(REPL_OBJS) \ - $(ADAPTATION_LIBS) \ - $(ESI_LIBS) \ - $(SSL_LIBS) \ - $(top_builddir)/lib/libmisccontainers.la \ - $(top_builddir)/lib/libmiscencoding.la \ - $(top_builddir)/lib/libmiscutil.la \ ipc/libipc.la \ mgr/libmgr.la \ sbuf/libsbuf.la \ - store/libstore.la \ - $(SNMP_LIBS) \ + $(top_builddir)/lib/libmisccontainers.la \ + $(top_builddir)/lib/libmiscencoding.la \ + $(top_builddir)/lib/libmiscutil.la \ $(NETTLELIB) \ $(REGEXLIB) \ $(SSLLIB) \ - $(KRB5LIBS) \ $(LIBCPPUNIT_LIBS) \ $(COMPAT_LIB) \ $(XTRA_LIBS) -tests_testEventLoop_LDFLAGS = $(LIBADD_DL) +tests_testACLMaxUserIP_LDFLAGS = $(LIBADD_DL) +## Tests of http/* and HTTP Protocol objects + +check_PROGRAMS += tests/test_http_range tests_test_http_range_SOURCES = \ AccessLogEntry.cc \ BodyPipe.cc \ @@ -2313,77 +2421,158 @@ tests_test_http_range_LDADD = \ $(XTRA_LIBS) tests_test_http_range_LDFLAGS = $(LIBADD_DL) -## Tests of parser/* objects -tests_testTokenizer_SOURCES = \ - tests/testTokenizer.h \ - tests/testTokenizer.cc -nodist_tests_testTokenizer_SOURCES = \ - parser/Tokenizer.h \ - SquidString.h \ +check_PROGRAMS += tests/testHttp1Parser +tests_testHttp1Parser_SOURCES = \ + Debug.h \ + MemBuf.cc \ + MemBuf.h \ + tests/stub_MemObject.cc \ + mime_header.cc \ + mime_header.h \ String.cc \ - $(TESTSOURCES) \ + cache_cf.h \ + tests/stub_SBufDetailedStats.cc \ + tests/stub_cache_cf.cc \ + tests/stub_cache_manager.cc \ + tests/stub_comm.cc \ + tests/stub_cbdata.cc \ tests/stub_debug.cc \ + tests/stub_event.cc \ + tests/stub_HelperChildConfig.cc \ tests/stub_libmem.cc \ + tests/stub_libsecurity.cc \ + tests/stub_stmem.cc \ + tests/stub_store.cc \ + tests/stub_store_stats.cc \ + tools.h \ + tests/stub_tools.cc \ + tests/testHttp1Parser.cc \ + tests/testHttp1Parser.h \ tests/stub_time.cc \ - tests/stub_SBufDetailedStats.cc -tests_testTokenizer_LDFLAGS = $(LIBADD_DL) -tests_testTokenizer_LDADD = \ + tests/stub_libanyp.cc \ + wordlist.h \ + wordlist.cc +nodist_tests_testHttp1Parser_SOURCES = \ + $(TESTSOURCES) +tests_testHttp1Parser_LDADD= \ + http/libhttp.la \ parser/libparser.la \ + anyp/libanyp.la \ + SquidConfig.o \ base/libbase.la \ + ip/libip.la \ sbuf/libsbuf.la \ $(top_builddir)/lib/libmiscutil.la \ + $(SSLLIB) \ $(LIBCPPUNIT_LIBS) \ $(COMPAT_LIB) \ $(XTRA_LIBS) +tests_testHttp1Parser_LDFLAGS = $(LIBADD_DL) -tests_testHttp1Parser_SOURCES = \ - Debug.h \ +check_PROGRAMS += tests/testHttpReply +tests_testHttpReply_SOURCES=\ + cbdata.cc \ + cbdata.h \ + ConfigParser.cc \ + tests/stub_ETag.cc \ + fatal.h \ + tests/stub_fatal.cc \ + HttpBody.h \ + HttpBody.cc \ + HttpHeaderFieldStat.h \ + HttpHdrCc.h \ + HttpHdrCc.cc \ + HttpHdrContRange.cc \ + HttpHdrContRange.h \ + HttpHdrRange.cc \ + HttpHdrSc.cc \ + HttpHdrSc.h \ + HttpHdrScTarget.cc \ + HttpHdrScTarget.h \ + HttpHeader.h \ + HttpHeader.cc \ + HttpHeaderMask.h \ + HttpHeaderFieldInfo.h \ + HttpHeaderTools.h \ + HttpHeaderTools.cc \ + HttpControlMsg.cc \ + HttpControlMsg.h \ + HttpReply.cc \ + HttpReply.h \ + MasterXaction.cc \ + MasterXaction.h \ MemBuf.cc \ MemBuf.h \ - tests/stub_MemObject.cc \ - mime_header.cc \ mime_header.h \ + mime_header.cc \ + Notes.h \ + Notes.cc \ + SquidString.h \ + SquidTime.h \ + tests/stub_SBufDetailedStats.cc \ String.cc \ + StrList.h \ + StrList.cc \ + log/access_log.h \ + tests/stub_access_log.cc \ cache_cf.h \ - tests/stub_SBufDetailedStats.cc \ tests/stub_cache_cf.cc \ tests/stub_cache_manager.cc \ tests/stub_comm.cc \ - tests/stub_cbdata.cc \ tests/stub_debug.cc \ + tests/stub_errorpage.cc \ tests/stub_event.cc \ + tests/stub_fd.cc \ tests/stub_HelperChildConfig.cc \ - tests/stub_libmem.cc \ + tests/stub_libformat.cc \ + tests/stub_libauth.cc \ + tests/stub_libcomm.cc \ + tests/stub_libmgr.cc \ tests/stub_libsecurity.cc \ - tests/stub_stmem.cc \ + tests/stub_libsslsquid.cc \ + StatCounters.h \ + StatCounters.cc \ + StatHist.h \ + tests/stub_StatHist.cc \ + repl_modules.h \ tests/stub_store.cc \ tests/stub_store_stats.cc \ tools.h \ - tests/stub_tools.cc \ - tests/testHttp1Parser.cc \ - tests/testHttp1Parser.h \ + tests/stub_tools.cc \ + tests/stub_HttpRequest.cc \ + tests/testHttpReply.cc \ + tests/testHttpReply.h \ tests/stub_time.cc \ tests/stub_libanyp.cc \ wordlist.h \ wordlist.cc -nodist_tests_testHttp1Parser_SOURCES = \ - $(TESTSOURCES) -tests_testHttp1Parser_LDADD= \ +nodist_tests_testHttpReply_SOURCES=\ + $(TESTSOURCES) \ + hier_code.cc +tests_testHttpReply_LDADD=\ + CommCalls.o \ http/libhttp.la \ parser/libparser.la \ + acl/libacls.la \ + acl/libapi.la \ + acl/libstate.la \ anyp/libanyp.la \ - SquidConfig.o \ - base/libbase.la \ ip/libip.la \ + base/libbase.la \ + ipc/libipc.la \ + mem/libmem.la \ sbuf/libsbuf.la \ + $(top_builddir)/lib/libmisccontainers.la \ + $(top_builddir)/lib/libmiscencoding.la \ $(top_builddir)/lib/libmiscutil.la \ + $(NETTLELIB) \ $(SSLLIB) \ $(LIBCPPUNIT_LIBS) \ $(COMPAT_LIB) \ $(XTRA_LIBS) -tests_testHttp1Parser_LDFLAGS = $(LIBADD_DL) +tests_testHttpReply_LDFLAGS = $(LIBADD_DL) -## Tests of the HttpRequest module. +check_PROGRAMS += tests/testHttpRequest tests_testHttpRequest_SOURCES = \ AccessLogEntry.cc \ RequestFlags.h \ @@ -2574,481 +2763,333 @@ nodist_tests_testHttpRequest_SOURCES = \ $(BUILT_SOURCES) tests_testHttpRequest_LDADD = \ libsquid.la \ - clients/libclients.la \ - servers/libservers.la \ - helper/libhelper.la \ - ftp/libftp.la \ - http/libhttp.la \ - ident/libident.la \ - acl/libacls.la \ - acl/libstate.la \ - acl/libapi.la \ - parser/libparser.la \ - ip/libip.la \ - fs/libfs.la \ - $(SSL_LIBS) \ - ipc/libipc.la \ - parser/libparser.la \ - dns/libdns.la \ - base/libbase.la \ - mgr/libmgr.la \ - anyp/libanyp.la \ - $(SNMP_LIBS) \ - icmp/libicmp.la \ - comm/libcomm.la \ - log/liblog.la \ - format/libformat.la \ - store/libstore.la \ - sbuf/libsbuf.la \ - $(REPL_OBJS) \ - $(ADAPTATION_LIBS) \ - $(ESI_LIBS) \ - $(top_builddir)/lib/libmisccontainers.la \ - $(top_builddir)/lib/libmiscencoding.la \ - $(top_builddir)/lib/libmiscutil.la \ - $(NETTLELIB) \ - $(REGEXLIB) \ - $(SSLLIB) \ - $(KRB5LIBS) \ - $(LIBCPPUNIT_LIBS) \ - $(COMPAT_LIB) \ - $(XTRA_LIBS) -tests_testHttpRequest_LDFLAGS = $(LIBADD_DL) - -## Tests for icmp/* objects -# icmp/libicmpcore.la is used by pinger so SHOULD NOT require more dependancies! :-( -tests_testIcmp_SOURCES = \ - tests/testIcmp.h \ - tests/testIcmp.cc -nodist_tests_testIcmp_SOURCES = \ - icmp/Icmp.h \ - SquidTime.h \ - tests/stub_debug.cc \ - tests/stub_libmem.cc \ - tests/stub_SBuf.cc \ - time.cc \ - globals.cc -tests_testIcmp_LDFLAGS = $(LIBADD_DL) -tests_testIcmp_LDADD=\ - icmp/libicmpcore.la \ - ip/libip.la \ - base/libbase.la \ - $(LIBCPPUNIT_LIBS) \ - $(COMPAT_LIB) \ - $(XTRA_LIBS) - -tests_testNetDb_SOURCES = \ - tests/testNetDb.cc \ - tests/testNetDb.h -nodist_tests_testNetDb_SOURCES = \ - SquidTime.h \ - tests/stub_debug.cc \ - tests/stub_libmem.cc \ - tests/stub_SBuf.cc \ - time.cc \ - globals.cc -tests_testNetDb_LDFLAGS = $(LIBADD_DL) -tests_testNetDb_LDADD = \ - icmp/libicmp.la \ - ip/libip.la \ - base/libbase.la \ - $(top_builddir)/lib/libmisccontainers.la \ - $(LIBCPPUNIT_LIBS) \ - $(COMPAT_LIB) \ - $(XTRA_LIBS) - -## Tests for ip/* objects -tests_testIpAddress_SOURCES= \ - tests/testAddress.cc \ - tests/testAddress.h -nodist_tests_testIpAddress_SOURCES= \ - ip/Address.h \ - tests/stub_debug.cc \ - tests/stub_libmem.cc \ - tests/stub_tools.cc -tests_testIpAddress_LDADD= \ - ip/libip.la \ - base/libbase.la \ - $(LIBCPPUNIT_LIBS) \ - $(COMPAT_LIB) \ - $(XTRA_LIBS) -tests_testIpAddress_LDFLAGS= $(LIBADD_DL) - -## why so many sources? well httpHeaderTools requites ACLChecklist & friends. -## first line - what we are testing. -tests_testStore_SOURCES= \ - CacheDigest.h \ - tests/stub_CacheDigest.cc \ - cbdata.cc \ - ClientInfo.h \ - tests/stub_CollapsedForwarding.cc \ - ConfigOption.cc \ - ConfigParser.cc \ - $(DELAY_POOL_SOURCE) \ - fs_io.h \ - fs_io.cc \ - ETag.cc \ - event.cc \ - EventLoop.cc \ - fatal.h \ - tests/stub_fatal.cc \ - FileMap.h \ - filemap.cc \ - HttpHeaderFieldStat.h \ - HttpHdrCc.h \ - HttpHdrCc.cc \ - HttpHdrContRange.cc \ - HttpHdrRange.cc \ - HttpHdrSc.cc \ - HttpHdrScTarget.cc \ - HttpHeaderFieldInfo.h \ - HttpHeaderTools.h \ - HttpHeaderTools.cc \ - HttpHeader.h \ - HttpHeader.cc \ - RequestFlags.cc \ - RequestFlags.h \ - int.h \ - int.cc \ - MasterXaction.cc \ - MasterXaction.h \ - mem_node.cc \ - MemBuf.cc \ - MemObject.cc \ - MemStore.cc \ - Notes.h \ - Notes.cc \ - Parsing.cc \ - RemovalPolicy.cc \ - refresh.h \ - refresh.cc \ - StatCounters.h \ - StatCounters.cc \ - StatHist.h \ - StatHist.cc \ - stmem.cc \ - repl_modules.h \ - store.cc \ - store_io.cc \ - store_swapout.cc \ - StoreIOState.cc \ - tests/stub_StoreMeta.cc \ - StoreMetaUnpacker.cc \ - StoreSwapLogData.cc \ - store_key_md5.h \ - store_key_md5.cc \ - tests/stub_SBufDetailedStats.cc \ - String.cc \ - StrList.h \ - StrList.cc \ - tests/CapturingStoreEntry.h \ - log/access_log.h \ - tests/stub_access_log.cc \ - tests/stub_acl.cc \ - cache_cf.h \ - tests/stub_cache_cf.cc \ - tests/stub_cache_manager.cc \ - tests/stub_client_side_request.cc \ - tests/stub_comm.cc \ - tests/stub_debug.cc \ - tests/stub_errorpage.cc \ - fd.h \ - fde.h \ - tests/stub_fd.cc \ - tests/stub_helper.cc \ - tests/stub_HelperChildConfig.cc \ - tests/stub_http.cc \ - tests/stub_libauth.cc \ - tests/stub_libeui.cc \ - tests/stub_libdiskio.cc \ - tests/stub_libformat.cc \ - tests/stub_libsecurity.cc \ - tests/stub_libsslsquid.cc \ - HttpBody.h \ - HttpBody.cc \ - tests/stub_HttpReply.cc \ - tests/stub_HttpRequest.cc \ - tests/stub_libcomm.cc \ - mime.h \ - tests/stub_mime.cc \ - tests/stub_Port.cc \ - tests/stub_stat.cc \ - tests/stub_store_client.cc \ - tests/stub_store_stats.cc \ - store_rebuild.h \ - tests/stub_store_rebuild.cc \ - tests/stub_store_swapout.cc \ - tools.h \ - Transients.cc \ - tests/stub_tools.cc \ - tests/stub_UdsOp.cc \ - tests/testPackableStream.cc \ - tests/testPackableStream.h \ - tests/testStore.cc \ - tests/testStore.h \ - tests/testStoreController.cc \ - tests/testStoreController.h \ - tests/testStoreHashIndex.cc \ - tests/testStoreHashIndex.h \ - tests/testStoreSupport.cc \ - tests/testStoreSupport.h \ - tests/TestSwapDir.cc \ - tests/TestSwapDir.h \ - tests/stub_time.cc \ - tests/stub_libanyp.cc \ - wordlist.h \ - wordlist.cc - -nodist_tests_testStore_SOURCES= \ - $(TESTSOURCES) \ - SquidMath.cc \ - SquidMath.h \ - swap_log_op.cc - -tests_testStore_LDADD= \ - libsquid.la \ + clients/libclients.la \ + servers/libservers.la \ + helper/libhelper.la \ + ftp/libftp.la \ http/libhttp.la \ - parser/libparser.la \ ident/libident.la \ acl/libacls.la \ acl/libstate.la \ acl/libapi.la \ - dns/libdns.la \ - base/libbase.la \ + parser/libparser.la \ ip/libip.la \ fs/libfs.la \ - mgr/libmgr.la \ + $(SSL_LIBS) \ ipc/libipc.la \ + parser/libparser.la \ + dns/libdns.la \ + base/libbase.la \ + mgr/libmgr.la \ anyp/libanyp.la \ - mem/libmem.la \ + $(SNMP_LIBS) \ + icmp/libicmp.la \ + comm/libcomm.la \ + log/liblog.la \ + format/libformat.la \ store/libstore.la \ sbuf/libsbuf.la \ - DiskIO/libdiskio.la \ + $(REPL_OBJS) \ + $(ADAPTATION_LIBS) \ + $(ESI_LIBS) \ $(top_builddir)/lib/libmisccontainers.la \ $(top_builddir)/lib/libmiscencoding.la \ $(top_builddir)/lib/libmiscutil.la \ $(NETTLELIB) \ $(REGEXLIB) \ $(SSLLIB) \ - CommCalls.o \ + $(KRB5LIBS) \ $(LIBCPPUNIT_LIBS) \ $(COMPAT_LIB) \ $(XTRA_LIBS) -tests_testStore_LDFLAGS = $(LIBADD_DL) +tests_testHttpRequest_LDFLAGS = $(LIBADD_DL) -## string needs mem.cc. -## mem.cc needs ClientInfo.h -## libsquid pulls in SquidConfig and children. stub them. -tests_testString_SOURCES = \ - ClientInfo.h \ - MemBuf.cc \ - String.cc \ - tests/stub_SBufDetailedStats.cc \ - tests/testString.cc \ - tests/testString.h \ - cache_cf.h \ - tests/stub_cache_cf.cc \ - tests/stub_cache_manager.cc \ - tests/stub_cbdata.cc \ +## Tests of ip/* + +check_PROGRAMS += tests/testIpAddress +tests_testIpAddress_SOURCES= \ + tests/testAddress.cc \ + tests/testAddress.h +nodist_tests_testIpAddress_SOURCES= \ + ip/Address.h \ tests/stub_debug.cc \ - tests/stub_HelperChildConfig.cc \ tests/stub_libmem.cc \ - tools.h \ - tests/stub_tools.cc \ - tests/stub_time.cc \ - wordlist.h \ - wordlist.cc -nodist_tests_testString_SOURCES = \ - $(TESTSOURCES) -tests_testString_LDADD = \ - base/libbase.la \ - libsquid.la \ + tests/stub_tools.cc +tests_testIpAddress_LDADD= \ ip/libip.la \ - sbuf/libsbuf.la \ - $(top_builddir)/lib/libmiscutil.la \ - $(REGEXLIB) \ - $(SSLLIB) \ + base/libbase.la \ $(LIBCPPUNIT_LIBS) \ $(COMPAT_LIB) \ $(XTRA_LIBS) -tests_testString_LDFLAGS = $(LIBADD_DL) +tests_testIpAddress_LDFLAGS= $(LIBADD_DL) -SWAP_TEST_DS =\ - repl_modules.o \ - ident/libident.la \ - acl/libacls.la \ - acl/libstate.la \ - acl/libapi.la \ +## Tests of icmp/* + +check_PROGRAMS += tests/testIcmp +# icmp/libicmpcore.la is used by pinger so SHOULD NOT require more dependancies! :-( +tests_testIcmp_SOURCES = \ + tests/testIcmp.h \ + tests/testIcmp.cc +nodist_tests_testIcmp_SOURCES = \ + icmp/Icmp.h \ + SquidTime.h \ + tests/stub_debug.cc \ + tests/stub_libmem.cc \ + tests/stub_SBuf.cc \ + time.cc \ + globals.cc +tests_testIcmp_LDADD=\ + icmp/libicmpcore.la \ + ip/libip.la \ base/libbase.la \ - libsquid.la \ + $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) +tests_testIcmp_LDFLAGS = $(LIBADD_DL) + +check_PROGRAMS += tests/testNetDb +tests_testNetDb_SOURCES = \ + tests/testNetDb.cc \ + tests/testNetDb.h +nodist_tests_testNetDb_SOURCES = \ + SquidTime.h \ + tests/stub_debug.cc \ + tests/stub_libmem.cc \ + tests/stub_SBuf.cc \ + time.cc \ + globals.cc +tests_testNetDb_LDADD = \ + icmp/libicmp.la \ ip/libip.la \ - fs/libfs.la \ - DiskIO/libdiskio.la \ - ipc/libipc.la \ - mgr/libmgr.la \ - $(REPL_OBJS) + base/libbase.la \ + $(top_builddir)/lib/libmisccontainers.la \ + $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) \ + $(XTRA_LIBS) +tests_testNetDb_LDFLAGS = $(LIBADD_DL) -tests_testUfs_SOURCES = \ +## Tests of mgr/* and CacheManager objects + +check_PROGRAMS += tests/testCacheManager +tests_testCacheManager_SOURCES = \ AccessLogEntry.cc \ - AccessLogEntry.h \ - tests/testUfs.cc \ - tests/testUfs.h \ - tests/stub_cache_manager.cc \ - tests/stub_client_db.cc \ - tests/stub_CollapsedForwarding.cc \ - tests/stub_HelperChildConfig.cc \ - tests/stub_icp.cc \ - tests/stub_ipc.cc \ - tests/stub_ipcache.cc \ - tests/stub_libeui.cc \ - tests/stub_libicmp.cc \ - tests/stub_liblog.cc \ - tests/stub_neighbors.cc \ - tests/stub_pconn.cc \ - tests/stub_Port.cc \ - tests/stub_UdsOp.cc \ - internal.h \ - tests/stub_internal.cc \ - tests/stub_libformat.cc \ - tests/stub_libsecurity.cc \ - tests/stub_stat.cc \ - store_rebuild.h \ - tests/stub_store_rebuild.cc \ + debug.cc \ + RequestFlags.h \ + RequestFlags.cc \ + HttpRequest.cc \ + String.cc \ + tests/testCacheManager.cc \ + tests/testCacheManager.h \ + tests/stub_main_cc.cc \ + tests/stub_HttpControlMsg.cc \ + tests/stub_ipc_Forwarder.cc \ tests/stub_store_stats.cc \ + tests/stub_EventLoop.cc \ + time.cc \ + BodyPipe.cc \ + cache_manager.cc \ + cache_cf.h \ + AuthReg.h \ + RefreshPattern.h \ + cache_cf.cc \ + CachePeer.cc \ + CachePeer.h \ + CacheDigest.h \ + tests/stub_CacheDigest.cc \ + carp.h \ + tests/stub_carp.cc \ + cbdata.cc \ + client_db.h \ + client_db.cc \ + client_side.h \ + client_side.cc \ + client_side_reply.cc \ + client_side_request.cc \ + ClientInfo.h \ + clientStream.cc \ + tests/stub_CollapsedForwarding.cc \ + ConfigOption.cc \ + ConfigParser.cc \ + CpuAffinityMap.cc \ + CpuAffinityMap.h \ + CpuAffinitySet.cc \ + CpuAffinitySet.h \ + $(DELAY_POOL_SOURCE) \ + fs_io.h \ + fs_io.cc \ + dlink.h \ + dlink.cc \ + $(DNSSOURCE) \ + errorpage.cc \ + tests/stub_ETag.cc \ + event.cc \ + external_acl.cc \ + ExternalACLEntry.cc \ fatal.h \ tests/stub_fatal.cc \ fd.h \ fd.cc \ - fde.h \ fde.cc \ - client_db.h \ - FadingCounter.cc \ - fs_io.h \ - fs_io.cc \ FileMap.h \ filemap.cc \ - HttpBody.h \ - HttpBody.cc \ - HttpReply.cc \ - int.h \ - int.cc \ - LogTags.cc \ - RequestFlags.h \ - RequestFlags.cc \ - Transients.cc \ - MasterXaction.cc \ - MasterXaction.h \ - MemObject.cc \ - MemStore.cc \ - Notes.h \ - Notes.cc \ - StoreSwapLogData.cc \ - StoreIOState.cc \ - StoreMetaUnpacker.cc \ - $(STOREMETA_SOURCE) \ - StoreFileSystem.cc \ - store_io.cc \ - store_swapout.cc \ - store_swapmeta.cc \ - $(UNLINKDSOURCE) \ - $(WIN32_SOURCE) \ - event.cc \ - $(DELAY_POOL_SOURCE) \ - CacheDigest.h \ - tests/stub_CacheDigest.cc \ - ConfigParser.cc \ - EventLoop.cc \ - RemovalPolicy.cc \ - repl_modules.h \ - store.cc \ - store_key_md5.h \ - store_key_md5.cc \ - Parsing.cc \ - ConfigOption.cc \ - tests/stub_acl.cc \ - cache_cf.h \ - tests/stub_cache_cf.cc \ - tests/stub_helper.cc \ - cbdata.cc \ - tests/stub_SBufDetailedStats.cc \ - String.cc \ - tests/stub_debug.cc \ - tests/stub_client_side_request.cc \ - tests/stub_http.cc \ - tests/stub_libauth.cc \ - mem_node.cc \ - stmem.cc \ - mime.h \ - tests/stub_mime.cc \ + fqdncache.h \ + fqdncache.cc \ + FwdState.cc \ + FwdState.h \ + gopher.h \ + gopher.cc \ + hier_code.h \ + helper.cc \ + $(HTCPSOURCE) \ + http.cc \ + HttpBody.h \ + HttpBody.cc \ + HttpHeader.h \ + HttpHeader.cc \ HttpHeaderFieldInfo.h \ HttpHeaderTools.h \ HttpHeaderTools.cc \ - HttpHeader.h \ - HttpHeader.cc \ - ClientInfo.h \ - MemBuf.cc \ - HttpHdrContRange.cc \ HttpHeaderFieldStat.h \ HttpHdrCc.h \ HttpHdrCc.cc \ + HttpHdrContRange.cc \ + HttpHdrRange.cc \ HttpHdrSc.cc \ HttpHdrScTarget.cc \ - tests/stub_libanyp.cc \ + HttpReply.cc \ + icp_v2.cc \ + icp_v3.cc \ + $(IPC_SOURCE) \ + ipcache.cc \ + int.h \ + int.cc \ + internal.h \ + internal.cc \ + LogTags.cc \ + tests/stub_libsecurity.cc \ + MasterXaction.cc \ + MasterXaction.h \ + multicast.h \ + multicast.cc \ + mem_node.cc \ + MemBuf.cc \ + MemObject.cc \ + mime.h \ + mime.cc \ + mime_header.h \ + mime_header.cc \ + neighbors.h \ + neighbors.cc \ + Notes.cc \ + Notes.h \ + Parsing.cc \ + pconn.cc \ + peer_digest.cc \ + peer_proxy_negotiate_auth.h \ + peer_proxy_negotiate_auth.cc \ + peer_select.cc \ + peer_sourcehash.h \ + peer_sourcehash.cc \ + peer_userhash.h \ + peer_userhash.cc \ + PeerPoolMgr.h \ + PeerPoolMgr.cc \ + Pipeline.cc \ + Pipeline.h \ + redirect.h \ + tests/stub_redirect.cc \ + refresh.h \ + refresh.cc \ + RemovalPolicy.cc \ + tests/stub_SBufDetailedStats.cc \ + $(SNMP_SOURCE) \ + SquidMath.h \ + SquidMath.cc \ + IoStats.h \ + stat.h \ + stat.cc \ StatCounters.h \ StatCounters.cc \ StatHist.h \ - StatHist.cc \ StrList.h \ StrList.cc \ - HttpHdrRange.cc \ - ETag.cc \ - tests/stub_errorpage.cc \ - tests/stub_HttpRequest.cc \ - log/access_log.h \ - tests/stub_access_log.cc \ - refresh.h \ - refresh.cc \ - tests/stub_store_client.cc \ + tests/stub_libauth_acls.cc \ + tests/stub_libauth.cc \ + tests/stub_libdiskio.cc \ + tests/stub_StatHist.cc \ + stmem.cc \ + repl_modules.h \ + store.cc \ + store_client.cc \ + store_digest.h \ + tests/stub_store_digest.cc \ + store_io.cc \ + store_key_md5.h \ + store_key_md5.cc \ + store_log.h \ + store_log.cc \ + store_rebuild.h \ + store_rebuild.cc \ + store_swapin.h \ + store_swapin.cc \ + store_swapmeta.cc \ + store_swapout.cc \ + StoreFileSystem.cc \ + StoreIOState.cc \ + tests/stub_StoreMeta.cc \ + StoreMetaUnpacker.cc \ + StoreSwapLogData.cc \ tools.h \ - tests/stub_tools.cc \ - tests/testStoreSupport.cc \ - tests/testStoreSupport.h \ - time.cc \ + tools.cc \ + Transients.cc \ + tests/stub_tunnel.cc \ + tests/stub_SwapDir.cc \ + MemStore.cc \ + $(UNLINKDSOURCE) \ + urn.h \ + urn.cc \ + wccp2.h \ + tests/stub_wccp2.cc \ + whois.h \ + tests/stub_whois.cc \ + FadingCounter.cc \ + $(WIN32_SOURCE) \ wordlist.h \ wordlist.cc - -nodist_tests_testUfs_SOURCES = \ - $(TESTSOURCES) \ - hier_code.cc \ - SquidMath.cc \ - SquidMath.h \ - swap_log_op.cc -tests_testUfs_LDADD = \ +nodist_tests_testCacheManager_SOURCES = \ + $(BUILT_SOURCES) +# comm.cc only requires comm/libcomm.la until fdc_table is dead. +tests_testCacheManager_LDADD = \ + libsquid.la \ + clients/libclients.la \ + servers/libservers.la \ + ftp/libftp.la \ + helper/libhelper.la \ http/libhttp.la \ parser/libparser.la \ - CommCalls.o \ ident/libident.la \ acl/libacls.la \ acl/libstate.la \ acl/libapi.la \ - libsquid.la \ + dns/libdns.la \ + base/libbase.la \ ip/libip.la \ fs/libfs.la \ - mgr/libmgr.la \ + comm/libcomm.la \ + eui/libeui.la \ + icmp/libicmp.la \ + log/liblog.la \ + format/libformat.la \ $(REPL_OBJS) \ - acl/libacls.la \ - DiskIO/libdiskio.la \ - acl/libapi.la \ - anyp/libanyp.la \ + $(ADAPTATION_LIBS) \ + $(ESI_LIBS) \ $(SSL_LIBS) \ + anyp/libanyp.la \ ipc/libipc.la \ - comm/libcomm.la \ - dns/libdns.la \ - base/libbase.la \ - ip/libip.la \ + mgr/libmgr.la \ + $(SNMP_LIBS) \ mem/libmem.la \ store/libstore.la \ - $(ADAPTATION_LIBS) \ sbuf/libsbuf.la \ $(top_builddir)/lib/libmisccontainers.la \ $(top_builddir)/lib/libmiscencoding.la \ @@ -3056,202 +3097,338 @@ tests_testUfs_LDADD = \ $(NETTLELIB) \ $(REGEXLIB) \ $(SSLLIB) \ + $(KRB5LIBS) \ $(LIBCPPUNIT_LIBS) \ $(COMPAT_LIB) \ $(XTRA_LIBS) -tests_testUfs_LDFLAGS = $(LIBADD_DL) -tests_testUfs_DEPENDENCIES = \ - $(SWAP_TEST_DS) +tests_testCacheManager_LDFLAGS = $(LIBADD_DL) -check_PROGRAMS += testRefCount -testRefCount_SOURCES= \ - base/Lock.h \ - base/RefCount.h \ +check_PROGRAMS += tests/testStatHist +tests_testStatHist_SOURCES = \ tests/stub_cbdata.cc \ + fatal.h \ + tests/stub_fatal.cc \ + tests/stub_MemBuf.cc \ + tests/stub_SBufDetailedStats.cc \ + StatHist.cc \ + StatHist.h \ + String.cc \ + tests/stub_cache_manager.cc \ + tests/stub_comm.cc \ tests/stub_debug.cc \ + tests/stub_DelayId.cc \ + tests/stub_HelperChildConfig.cc \ tests/stub_libmem.cc \ + tests/stub_MemObject.cc \ + mime.h \ + tests/stub_mime.cc \ + tests/stub_pconn.cc \ + tests/stub_stmem.cc \ + repl_modules.h \ + tests/stub_store.cc \ + tests/stub_store_stats.cc \ + time.cc \ + tools.h \ + tests/stub_tools.cc \ + tests/testStatHist.cc \ + tests/testStatHist.h +nodist_tests_testStatHist_SOURCES = \ + $(TESTSOURCES) +tests_testStatHist_LDADD = \ + sbuf/libsbuf.la \ + base/libbase.la \ + $(top_builddir)/lib/libmiscutil.la \ + $(top_builddir)/lib/libmisccontainers.la \ + $(LIBCPPUNIT_LIBS) \ + $(COMPAT_LIB) +tests_testStatHist_LDFLAGS = $(LIBADD_DL) + +## Tests of ConfigParser + +check_PROGRAMS += tests/testConfigParser +tests_testConfigParser_SOURCES = \ + ClientInfo.h \ tests/stub_MemBuf.cc \ - tests/testRefCount.cc -testRefCount_LDADD = \ + tests/stub_time.cc \ + tests/stub_SBufDetailedStats.cc \ + String.cc \ + ConfigParser.cc \ + fatal.h \ + tests/stub_fatal.cc \ + tests/testConfigParser.cc \ + tests/testConfigParser.h \ + cache_cf.h \ + tests/stub_cache_cf.cc \ + tests/stub_cbdata.cc \ + tests/stub_debug.cc \ + tests/stub_libmem.cc \ + tests/stub_HelperChildConfig.cc \ + tools.h \ + tests/stub_tools.cc \ + wordlist.h \ + wordlist.cc +nodist_tests_testConfigParser_SOURCES = \ + $(TESTSOURCES) +tests_testConfigParser_LDADD = \ + libsquid.la \ + ip/libip.la \ + sbuf/libsbuf.la \ base/libbase.la \ $(top_builddir)/lib/libmiscutil.la \ + $(REGEXLIB) \ + $(SSLLIB) \ + $(LIBCPPUNIT_LIBS) \ $(COMPAT_LIB) \ $(XTRA_LIBS) +tests_testConfigParser_LDFLAGS = $(LIBADD_DL) -tests_testRock_SOURCES = \ +## Tests of Event handling + +check_PROGRAMS += tests/testEvent +tests_testEvent_SOURCES = \ AccessLogEntry.cc \ - AccessLogEntry.h \ + BodyPipe.cc \ + CacheDigest.h \ + tests/stub_CacheDigest.cc \ + cache_cf.h \ + AuthReg.h \ + RefreshPattern.h \ + cache_cf.cc \ + CachePeer.cc \ + CachePeer.h \ + cache_manager.cc \ + carp.h \ + tests/stub_carp.cc \ cbdata.cc \ - CacheDigest.h \ - CollapsedForwarding.h \ - CollapsedForwarding.cc \ - tests/stub_CacheDigest.cc \ + client_db.h \ + client_db.cc \ + client_side.h \ + client_side.cc \ + client_side_reply.cc \ + client_side_request.cc \ + ClientInfo.h \ + clientStream.cc \ + tests/stub_CollapsedForwarding.cc \ ConfigOption.cc \ ConfigParser.cc \ + CpuAffinityMap.cc \ + CpuAffinityMap.h \ + CpuAffinitySet.cc \ + CpuAffinitySet.h \ + debug.cc \ + $(DELAY_POOL_SOURCE) \ fs_io.h \ fs_io.cc \ - ETag.cc \ - EventLoop.cc \ + dlink.h \ + dlink.cc \ + $(DNSSOURCE) \ + errorpage.cc \ + tests/stub_ETag.cc \ event.cc \ + EventLoop.h \ + EventLoop.cc \ + external_acl.cc \ + ExternalACLEntry.cc \ FadingCounter.cc \ fatal.h \ - fatal.cc \ + tests/stub_fatal.cc \ fd.h \ fd.cc \ - fde.h \ fde.cc \ FileMap.h \ filemap.cc \ - HttpHeaderFieldStat.h \ + fqdncache.h \ + fqdncache.cc \ + FwdState.cc \ + FwdState.h \ + gopher.h \ + gopher.cc \ + helper.cc \ + hier_code.h \ + $(HTCPSOURCE) \ + http.cc \ HttpBody.h \ HttpBody.cc \ - HttpHdrCc.cc \ - HttpHdrContRange.cc \ - HttpHdrRange.cc \ - HttpHdrSc.cc \ - HttpHdrScTarget.cc \ + tests/stub_HttpControlMsg.cc \ HttpHeader.h \ HttpHeader.cc \ HttpHeaderFieldInfo.h \ HttpHeaderTools.h \ HttpHeaderTools.cc \ + HttpHeaderFieldStat.h \ + HttpHdrCc.h \ + HttpHdrCc.cc \ + HttpHdrContRange.cc \ + HttpHdrRange.cc \ + HttpHdrSc.cc \ + HttpHdrScTarget.cc \ HttpReply.cc \ + PeerPoolMgr.h \ + PeerPoolMgr.cc \ + RequestFlags.h \ + RequestFlags.cc \ + HttpRequest.cc \ + icp_v2.cc \ + icp_v3.cc \ + $(IPC_SOURCE) \ + ipcache.cc \ int.h \ int.cc \ + internal.h \ + internal.cc \ LogTags.cc \ + tests/stub_libsecurity.cc \ MasterXaction.cc \ MasterXaction.h \ + tests/stub_libmem.cc \ + mem_node.cc \ MemBuf.cc \ MemObject.cc \ - MemStore.cc \ - mem_node.cc \ - Notes.h \ + mime.h \ + mime.cc \ + mime_header.h \ + mime_header.cc \ + multicast.h \ + multicast.cc \ + neighbors.h \ + neighbors.cc \ Notes.cc \ + Notes.h \ Parsing.cc \ + pconn.cc \ + peer_digest.cc \ + peer_proxy_negotiate_auth.h \ + peer_proxy_negotiate_auth.cc \ + peer_select.cc \ + peer_sourcehash.h \ + peer_sourcehash.cc \ + peer_userhash.h \ + peer_userhash.cc \ + Pipeline.cc \ + Pipeline.h \ + redirect.h \ + tests/stub_redirect.cc \ + refresh.h \ + refresh.cc \ RemovalPolicy.cc \ - RequestFlags.cc \ - RequestFlags.h \ + StrList.h \ + StrList.cc \ + tests/stub_SBufDetailedStats.cc \ + $(SNMP_SOURCE) \ + SquidMath.cc \ + SquidMath.h \ + IoStats.h \ + stat.h \ + stat.cc \ StatCounters.h \ StatCounters.cc \ StatHist.h \ - tests/stub_StatHist.cc \ + StatHist.cc \ stmem.cc \ repl_modules.h \ - tests/stub_stat.cc \ store.cc \ - StoreFileSystem.cc \ - StoreIOState.cc \ - StoreMetaUnpacker.cc \ - $(STOREMETA_SOURCE) \ - StoreSwapLogData.cc \ + store_client.cc \ + store_digest.h \ + tests/stub_store_digest.cc \ store_io.cc \ store_key_md5.h \ store_key_md5.cc \ + store_log.h \ + store_log.cc \ + store_rebuild.h \ + store_rebuild.cc \ + store_swapin.h \ + store_swapin.cc \ store_swapmeta.cc \ store_swapout.cc \ - tests/stub_SBufDetailedStats.cc \ + StoreFileSystem.cc \ + StoreIOState.cc \ + tests/stub_StoreMeta.cc \ + StoreMetaUnpacker.cc \ + StoreSwapLogData.cc \ String.cc \ - StrList.h \ - StrList.cc \ - Transients.h \ - Transients.cc \ - tests/testRock.cc \ - tests/testRock.h \ - tests/testStoreSupport.cc \ - tests/testStoreSupport.h \ - log/access_log.h \ - tests/stub_access_log.cc \ - cache_cf.h \ - tests/stub_cache_cf.cc \ - client_db.h \ - tests/stub_cache_manager.cc \ - tests/stub_client_db.cc \ - tests/stub_client_side_request.cc \ - tests/stub_debug.cc \ - tests/stub_errorpage.cc \ - tests/stub_HelperChildConfig.cc \ - tests/stub_http.cc \ - tests/stub_HttpRequest.cc \ + tests/stub_SwapDir.cc \ + tests/CapturingStoreEntry.h \ + tests/testEvent.cc \ + tests/testEvent.h \ + tests/stub_main_cc.cc \ + tests/stub_ipc_Forwarder.cc \ + tests/stub_libauth_acls.cc \ tests/stub_libauth.cc \ - tests/stub_icp.cc \ - tests/stub_ipc.cc \ - tests/stub_ipcache.cc \ + tests/stub_libdiskio.cc \ tests/stub_libeui.cc \ - tests/stub_libformat.cc \ - tests/stub_libicmp.cc \ - tests/stub_liblog.cc \ - tests/stub_libmgr.cc \ - tests/stub_libsecurity.cc \ - mime.h \ - tests/stub_mime.cc \ - tests/stub_neighbors.cc \ - tests/stub_Port.cc \ - tests/stub_pconn.cc \ - tests/stub_store_client.cc \ - store_rebuild.h \ - tests/stub_store_rebuild.cc \ tests/stub_store_stats.cc \ - tools.h \ - tests/stub_tools.cc \ time.cc \ - tests/stub_libanyp.cc \ + tools.h \ + tools.cc \ + Transients.cc \ + tests/stub_tunnel.cc \ + MemStore.cc \ + $(UNLINKDSOURCE) \ + urn.h \ + urn.cc \ + wccp2.h \ + tests/stub_wccp2.cc \ + whois.h \ + tests/stub_whois.cc \ + $(WIN32_SOURCE) \ wordlist.h \ - wordlist.cc \ - $(DELAY_POOL_SOURCE) \ - $(UNLINKDSOURCE) -nodist_tests_testRock_SOURCES = \ - $(TESTSOURCES) \ - hier_code.cc \ - SquidMath.cc \ - SquidMath.h \ - swap_log_op.cc -tests_testRock_LDADD = \ + wordlist.cc +nodist_tests_testEvent_SOURCES = \ + $(BUILT_SOURCES) +tests_testEvent_LDADD = \ + libsquid.la \ + clients/libclients.la \ + servers/libservers.la \ + ftp/libftp.la \ + helper/libhelper.la \ http/libhttp.la \ parser/libparser.la \ - libsquid.la \ - comm/libcomm.la \ - ip/libip.la \ - fs/libfs.la \ - $(COMMON_LIBS) \ - $(REPL_OBJS) \ - DiskIO/libdiskio.la \ + ident/libident.la \ acl/libacls.la \ - acl/libapi.la \ acl/libstate.la \ - anyp/libanyp.la \ - eui/libeui.la \ - $(SSL_LIBS) \ - ipc/libipc.la \ + acl/libapi.la \ + dns/libdns.la \ base/libbase.la \ - mem/libmem.la \ - store/libstore.la \ + ip/libip.la \ + fs/libfs.la \ + anyp/libanyp.la \ + icmp/libicmp.la \ + comm/libcomm.la \ + log/liblog.la \ + format/libformat.la \ + $(REPL_OBJS) \ $(ADAPTATION_LIBS) \ - sbuf/libsbuf.la \ + $(ESI_LIBS) \ + $(SSL_LIBS) \ $(top_builddir)/lib/libmisccontainers.la \ $(top_builddir)/lib/libmiscencoding.la \ $(top_builddir)/lib/libmiscutil.la \ + ipc/libipc.la \ + mgr/libmgr.la \ + store/libstore.la \ + sbuf/libsbuf.la \ + $(SNMP_LIBS) \ $(NETTLELIB) \ $(REGEXLIB) \ $(SSLLIB) \ + $(KRB5LIBS) \ $(LIBCPPUNIT_LIBS) \ $(COMPAT_LIB) \ $(XTRA_LIBS) -tests_testRock_LDFLAGS = $(AM_CPPFLAGS) $(LIBADD_DL) -tests_testRock_DEPENDENCIES = \ - $(SWAP_TEST_DS) +tests_testEvent_LDFLAGS = $(LIBADD_DL) -## Tests of the URL module. -## TODO: Trim this down once the insanity is over. -tests_testURL_SOURCES = \ +check_PROGRAMS += tests/testEventLoop +tests_testEventLoop_SOURCES = \ AccessLogEntry.cc \ BodyPipe.cc \ + CacheDigest.h \ + tests/stub_CacheDigest.cc \ + cache_manager.cc \ cache_cf.h \ AuthReg.h \ RefreshPattern.h \ cache_cf.cc \ - tests/stub_cache_manager.cc \ - CacheDigest.h \ - tests/stub_CacheDigest.cc \ CachePeer.cc \ CachePeer.h \ carp.h \ @@ -3272,6 +3449,7 @@ tests_testURL_SOURCES = \ CpuAffinityMap.h \ CpuAffinitySet.cc \ CpuAffinitySet.h \ + debug.cc \ $(DELAY_POOL_SOURCE) \ fs_io.h \ fs_io.cc \ @@ -3279,10 +3457,13 @@ tests_testURL_SOURCES = \ dlink.cc \ $(DNSSOURCE) \ errorpage.cc \ - ETag.cc \ + tests/stub_ETag.cc \ + EventLoop.h \ + EventLoop.cc \ event.cc \ external_acl.cc \ ExternalACLEntry.cc \ + FadingCounter.cc \ fatal.h \ tests/stub_fatal.cc \ fd.h \ @@ -3303,6 +3484,11 @@ tests_testURL_SOURCES = \ HttpBody.h \ HttpBody.cc \ tests/stub_HttpControlMsg.cc \ + HttpHeader.h \ + HttpHeader.cc \ + HttpHeaderFieldInfo.h \ + HttpHeaderTools.h \ + HttpHeaderTools.cc \ HttpHeaderFieldStat.h \ HttpHdrCc.h \ HttpHdrCc.cc \ @@ -3310,11 +3496,6 @@ tests_testURL_SOURCES = \ HttpHdrRange.cc \ HttpHdrSc.cc \ HttpHdrScTarget.cc \ - HttpHeader.h \ - HttpHeader.cc \ - HttpHeaderFieldInfo.h \ - HttpHeaderTools.h \ - HttpHeaderTools.cc \ HttpReply.cc \ PeerPoolMgr.h \ PeerPoolMgr.cc \ @@ -3329,23 +3510,23 @@ tests_testURL_SOURCES = \ int.cc \ internal.h \ internal.cc \ - tests/stub_libeui.cc \ LogTags.cc \ MasterXaction.cc \ MasterXaction.h \ - multicast.h \ - multicast.cc \ - mem_node.cc \ MemBuf.cc \ MemObject.cc \ + tests/stub_libmem.cc \ + mem_node.cc \ mime.h \ mime.cc \ mime_header.h \ mime_header.cc \ + multicast.h \ + multicast.cc \ neighbors.h \ neighbors.cc \ - Notes.h \ Notes.cc \ + Notes.h \ Parsing.cc \ pconn.cc \ peer_digest.cc \ @@ -3358,11 +3539,11 @@ tests_testURL_SOURCES = \ peer_userhash.cc \ Pipeline.cc \ Pipeline.h \ + RemovalPolicy.cc \ redirect.h \ tests/stub_redirect.cc \ refresh.h \ refresh.cc \ - RemovalPolicy.cc \ tests/stub_SBufDetailedStats.cc \ $(SNMP_SOURCE) \ SquidMath.h \ @@ -3373,7 +3554,7 @@ tests_testURL_SOURCES = \ StatCounters.h \ StatCounters.cc \ StatHist.h \ - tests/stub_StatHist.cc \ + StatHist.cc \ stmem.cc \ repl_modules.h \ store.cc \ @@ -3399,259 +3580,79 @@ tests_testURL_SOURCES = \ String.cc \ StrList.h \ StrList.cc \ - Transients.cc \ tests/stub_SwapDir.cc \ - MemStore.cc \ - tests/stub_debug.cc \ + tests/testEventLoop.cc \ + tests/testEventLoop.h \ + tests/stub_main_cc.cc \ + tests/stub_ipc_Forwarder.cc \ tests/stub_libauth_acls.cc \ tests/stub_libauth.cc \ tests/stub_libdiskio.cc \ - tests/stub_libmem.cc \ + tests/stub_libeui.cc \ tests/stub_libsecurity.cc \ - tests/stub_main_cc.cc \ - tests/stub_ipc_Forwarder.cc \ tests/stub_store_stats.cc \ - tests/testURL.cc \ - tests/testURL.h \ - tests/testUriScheme.cc \ - tests/testUriScheme.h \ - tests/stub_time.cc \ - tests/stub_EventLoop.cc \ + time.cc \ tools.h \ tools.cc \ + Transients.cc \ tests/stub_tunnel.cc \ + MemStore.cc \ + $(UNLINKDSOURCE) \ urn.h \ urn.cc \ wccp2.h \ tests/stub_wccp2.cc \ whois.h \ tests/stub_whois.cc \ - FadingCounter.cc \ $(WIN32_SOURCE) \ wordlist.h \ wordlist.cc -nodist_tests_testURL_SOURCES = \ +nodist_tests_testEventLoop_SOURCES = \ $(BUILT_SOURCES) -tests_testURL_LDADD = \ +tests_testEventLoop_LDADD = \ libsquid.la \ clients/libclients.la \ servers/libservers.la \ + ftp/libftp.la \ helper/libhelper.la \ http/libhttp.la \ - ftp/libftp.la \ parser/libparser.la \ - anyp/libanyp.la \ ident/libident.la \ acl/libacls.la \ - eui/libeui.la \ acl/libstate.la \ acl/libapi.la \ dns/libdns.la \ base/libbase.la \ ip/libip.la \ fs/libfs.la \ - $(SSL_LIBS) \ - ipc/libipc.la \ - mgr/libmgr.la \ - $(SNMP_LIBS) \ + anyp/libanyp.la \ icmp/libicmp.la \ comm/libcomm.la \ log/liblog.la \ format/libformat.la \ - store/libstore.la \ - sbuf/libsbuf.la \ - $(REGEXLIB) \ $(REPL_OBJS) \ $(ADAPTATION_LIBS) \ $(ESI_LIBS) \ + $(SSL_LIBS) \ $(top_builddir)/lib/libmisccontainers.la \ $(top_builddir)/lib/libmiscencoding.la \ $(top_builddir)/lib/libmiscutil.la \ - $(NETTLELIB) \ - $(SSLLIB) \ - $(KRB5LIBS) \ - $(LIBCPPUNIT_LIBS) \ - $(COMPAT_LIB) \ - $(XTRA_LIBS) -tests_testURL_LDFLAGS = $(LIBADD_DL) - -tests_testSBuf_SOURCES= \ - tests/testSBuf.h \ - tests/testSBuf.cc \ - tests/SBufFindTest.h \ - tests/SBufFindTest.cc \ - tests/stub_SBufDetailedStats.cc \ - tests/stub_time.cc \ - tests/stub_debug.cc \ - tests/stub_fatal.cc \ - tests/stub_libmem.cc -nodist_tests_testSBuf_SOURCES=$(TESTSOURCES) -tests_testSBuf_LDFLAGS = $(LIBADD_DL) -tests_testSBuf_LDADD= \ - sbuf/libsbuf.la \ - base/libbase.la \ - $(LIBCPPUNIT_LIBS) \ - $(COMPAT_LIB) \ - $(XTRA_LIBS) - -tests_testSBufList_SOURCES= \ - tests/testSBufList.h \ - tests/testSBufList.cc \ - tests/stub_SBufDetailedStats.cc \ - tests/stub_time.cc \ - tests/stub_debug.cc \ - tests/stub_fatal.cc \ - tests/stub_libmem.cc -nodist_tests_testSBufList_SOURCES=$(TESTSOURCES) -tests_testSBufList_LDFLAGS = $(LIBADD_DL) -tests_testSBufList_LDADD=\ - sbuf/libsbuf.la \ - base/libbase.la \ - $(LIBCPPUNIT_LIBS) \ - $(COMPAT_LIB) \ - $(XTRA_LIBS) - -tests_testConfigParser_SOURCES = \ - ClientInfo.h \ - tests/stub_MemBuf.cc \ - tests/stub_time.cc \ - tests/stub_SBufDetailedStats.cc \ - String.cc \ - ConfigParser.cc \ - fatal.h \ - tests/stub_fatal.cc \ - tests/testConfigParser.cc \ - tests/testConfigParser.h \ - cache_cf.h \ - tests/stub_cache_cf.cc \ - tests/stub_cbdata.cc \ - tests/stub_debug.cc \ - tests/stub_libmem.cc \ - tests/stub_HelperChildConfig.cc \ - tools.h \ - tests/stub_tools.cc \ - wordlist.h \ - wordlist.cc -nodist_tests_testConfigParser_SOURCES = \ - $(TESTSOURCES) -tests_testConfigParser_LDADD = \ - libsquid.la \ - ip/libip.la \ + ipc/libipc.la \ + mgr/libmgr.la \ sbuf/libsbuf.la \ - base/libbase.la \ - $(top_builddir)/lib/libmiscutil.la \ + store/libstore.la \ + $(SNMP_LIBS) \ + $(NETTLELIB) \ $(REGEXLIB) \ $(SSLLIB) \ + $(KRB5LIBS) \ $(LIBCPPUNIT_LIBS) \ $(COMPAT_LIB) \ $(XTRA_LIBS) -tests_testConfigParser_LDFLAGS = $(LIBADD_DL) - -tests_testStatHist_SOURCES = \ - tests/stub_cbdata.cc \ - fatal.h \ - tests/stub_fatal.cc \ - tests/stub_MemBuf.cc \ - tests/stub_SBufDetailedStats.cc \ - StatHist.cc \ - StatHist.h \ - String.cc \ - tests/stub_cache_manager.cc \ - tests/stub_comm.cc \ - tests/stub_debug.cc \ - tests/stub_DelayId.cc \ - tests/stub_HelperChildConfig.cc \ - tests/stub_libmem.cc \ - tests/stub_MemObject.cc \ - mime.h \ - tests/stub_mime.cc \ - tests/stub_pconn.cc \ - tests/stub_stmem.cc \ - repl_modules.h \ - tests/stub_store.cc \ - tests/stub_store_stats.cc \ - time.cc \ - tools.h \ - tests/stub_tools.cc \ - tests/testStatHist.cc \ - tests/testStatHist.h -nodist_tests_testStatHist_SOURCES = \ - $(TESTSOURCES) -tests_testStatHist_LDFLAGS = $(LIBADD_DL) -tests_testStatHist_LDADD = \ - sbuf/libsbuf.la \ - base/libbase.la \ - $(top_builddir)/lib/libmiscutil.la \ - $(top_builddir)/lib/libmisccontainers.la \ - $(LIBCPPUNIT_LIBS) \ - $(COMPAT_LIB) - -tests_testLookupTable_SOURCES = \ - tests/testLookupTable.h \ - tests/testLookupTable.cc \ - tests/stub_debug.cc \ - tests/stub_libmem.cc \ - tests/stub_SBufDetailedStats.cc \ - base/LookupTable.h -nodist_tests_testLookupTable_SOURCES = $(TESTSOURCES) -tests_testLookupTable_LDFLAGS = $(LIBADD_DL) -tests_testLookupTable_LDADD = \ - sbuf/libsbuf.la \ - base/libbase.la \ - $(LIBCPPUNIT_LIBS) \ - $(COMPAT_LIB) \ - $(XTRA_LIBS) - -tests_testEnumIterator_SOURCES = \ - base/EnumIterator.h \ - tests/stub_debug.cc \ - tests/stub_libmem.cc \ - tests/stub_SBuf.cc \ - tests/testEnumIterator.h \ - tests/testEnumIterator.cc -nodist_tests_testEnumIterator_SOURCES = \ - $(TESTSOURCES) -tests_testEnumIterator_LDFLAGS = $(LIBADD_DL) -tests_testEnumIterator_LDADD = \ - base/libbase.la \ - $(LIBCPPUNIT_LIBS) \ - $(COMPAT_LIB) \ - $(XTRA_LIBS) - -tests_testYesNoNone_SOURCES = \ - tests/testYesNoNone.cc \ - tests/testYesNoNone.h -nodist_tests_testYesNoNone_SOURCES = \ - tests/STUB.h \ - tests/stub_debug.cc \ - tests/stub_libmem.cc \ - tests/stub_SBuf.cc \ - base/YesNoNone.h -tests_testYesNoNone_LDADD= \ - base/libbase.la \ - $(LIBCPPUNIT_LIBS) \ - $(COMPAT_LIB) \ - $(XTRA_LIBS) -tests_testYesNoNone_LDFLAGS = $(LIBADD_DL) - -tests_testMem_SOURCES = \ - tests/testMem.cc \ - tests/testMem.h -nodist_tests_testMem_SOURCES = \ - tests/stub_debug.cc \ - tests/stub_SBuf.cc \ - tests/stub_time.cc \ - $(TESTSOURCES) -tests_testMem_LDADD= \ - base/libbase.la \ - mem/libmem.la \ - $(top_builddir)/lib/libmiscutil.la \ - $(LIBCPPUNIT_LIBS) \ - $(COMPAT_LIB) \ - $(XTRA_LIBS) -tests_testMem_LDFLAGS = $(LIBADD_DL) +tests_testEventLoop_LDFLAGS = $(LIBADD_DL) -TESTS += testHeaders +## Run the unit tests. check_PROGRAMS only builds the binaries. +TESTS += $(check_PROGRAMS) testHeaders ## Special Universal .h dependency test script ## aborts if error encountered