From: Amos Jeffries Date: Sun, 4 Jan 2015 07:40:55 +0000 (-0800) Subject: Improved automake 1.13+ support in unit-tests X-Git-Tag: merge-candidate-3-v1~378 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7f861c77c4aa898a4743c113d04fce1abc0699f6;p=thirdparty%2Fsquid.git Improved automake 1.13+ support in unit-tests Automake 1.13+ are warning about subdir-objects being enabled in future versions but Squid currently relies on several environment constructs that prevent that feature from working. * All cppunit tests share a main() implementation in testMain.cc which is not able to easily be built as a .o from locations such as compat/. Fix this by making the code to include/unitTestMain.h and including it as an inline main() definition for all cppunit tests core .cc files. * lib/testAll unit test Fix by splitting out into multiple unit-test binaries as is done by the rest of Squid. And removing duplicate testMain.cc. * lib/ and src/ objects link to objects in child directories Enable subdir-objects when possible. Some remain due to depending on stubs files in the not yet created src/tests/ build directory. That will be fixed in a future commit. --- diff --git a/compat/Makefile.am b/compat/Makefile.am index 805ccb9117..f86592a822 100644 --- a/compat/Makefile.am +++ b/compat/Makefile.am @@ -10,6 +10,7 @@ include $(top_srcdir)/src/Common.am +AUTOMAKE_OPTIONS = subdir-objects # Ideally this would be 100% inline functions and macro wrappers. @@ -95,8 +96,7 @@ TESTS += testPreCompiler testPreCompiler_SOURCES= \ testPreCompiler.h \ - testPreCompiler.cc \ - $(top_srcdir)/src/tests/testMain.cc + testPreCompiler.cc testPreCompiler_LDADD= $(SQUID_CPPUNIT_LA) $(SQUID_CPPUNIT_LIBS) testPreCompiler_LDFLAGS= diff --git a/compat/testPreCompiler.cc b/compat/testPreCompiler.cc index dc9f9a77d0..12e67e6a8f 100644 --- a/compat/testPreCompiler.cc +++ b/compat/testPreCompiler.cc @@ -8,6 +8,7 @@ #include "squid.h" #include "testPreCompiler.h" +#include "unitTestMain.h" #include diff --git a/src/tests/testMain.cc b/include/unitTestMain.h similarity index 89% rename from src/tests/testMain.cc rename to include/unitTestMain.h index e156fcc14d..45dfc1fa46 100644 --- a/src/tests/testMain.cc +++ b/include/unitTestMain.h @@ -6,6 +6,9 @@ * Please see the COPYING and CONTRIBUTORS files for details. */ +#ifndef SQUID_INCLUDE_UNITTESTMAIN_H +#define SQUID_INCLUDE_UNITTESTMAIN_H + #include "squid.h" #include @@ -29,6 +32,7 @@ main( int argc, char* argv[] ) // Add a listener that print dots as test run. // use BriefTestProgressListener to get names of each test // even when they pass. +// CPPUNIT_NS::BriefTestProgressListener progress; CPPUNIT_NS::TextTestProgressListener progress; controller.addListener( &progress ); @@ -44,3 +48,4 @@ main( int argc, char* argv[] ) return result.wasSuccessful() ? 0 : 1; } +#endif /* SQUID_INCLUDE_UNITTESTMAIN_H */ diff --git a/lib/Makefile.am b/lib/Makefile.am index 751545fcea..3480f479cb 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -7,6 +7,8 @@ include $(top_srcdir)/src/Common.am +AUTOMAKE_OPTIONS = subdir-objects + DIST_SUBDIRS = ntlmauth profiler rfcnb smblib libTrie snmplib SUBDIRS= EXTRA_DIST= @@ -79,24 +81,33 @@ libmiscutil_la_SOURCES = \ util.c \ xusleep.c -TESTS += tests/testAll +TESTS += tests/testRFC1035 tests/testRFC1738 -check_PROGRAMS += tests/testAll +check_PROGRAMS += tests/testRFC1035 tests/testRFC1738 -tests_testAll_SOURCES= \ +tests_testRFC1035_SOURCES= \ tests/testRFC1035.h \ - tests/testRFC1035.cc \ + tests/testRFC1035.cc + +tests_testRFC1035_LDADD= \ + $(SQUID_CPPUNIT_LA) $(SQUID_CPPUNIT_LIBS) \ + $(top_builddir)/lib/libmiscencoding.la \ + $(top_builddir)/lib/libmiscutil.la \ + $(COMPAT_LIB) + +tests_testRFC1035_LDFLAGS = $(LIBADD_DL) + +tests_testRFC1738_SOURCES= \ tests/testRFC1738.h \ - tests/testRFC1738.cc \ - tests/testMain.cc + tests/testRFC1738.cc -tests_testAll_LDADD= \ +tests_testRFC1738_LDADD= \ $(SQUID_CPPUNIT_LA) $(SQUID_CPPUNIT_LIBS) \ $(top_builddir)/lib/libmiscencoding.la \ $(top_builddir)/lib/libmiscutil.la \ $(COMPAT_LIB) -tests_testAll_LDFLAGS = $(LIBADD_DL) +tests_testRFC1738_LDFLAGS = $(LIBADD_DL) ## Special Universal .h dependency test script diff --git a/lib/tests/testMain.cc b/lib/tests/testMain.cc deleted file mode 100644 index 590f7b8304..0000000000 --- a/lib/tests/testMain.cc +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 1996-2014 The Squid Software Foundation and contributors - * - * Squid software is distributed under GPLv2+ license and includes - * contributions from numerous individuals and organizations. - * Please see the COPYING and CONTRIBUTORS files for details. - */ - -#include "squid.h" - -#include -#include -#include -#include -#include -#include - -int -main( int argc, char* argv[] ) -{ - // Create the event manager and test controller - CPPUNIT_NS::TestResult controller; - - // Add a listener that colllects test result - CPPUNIT_NS::TestResultCollector result; - controller.addListener( &result ); - - // Add a listener that print dots as test run. - CPPUNIT_NS::BriefTestProgressListener progress; - controller.addListener( &progress ); - - // Add the top suite to the test runner - CPPUNIT_NS::TestRunner runner; - runner.addTest( CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest() ); - runner.run( controller ); - - // Print test in a compiler compatible format. - CPPUNIT_NS::CompilerOutputter outputter( &result, std::cerr ); - outputter.write(); - - return result.wasSuccessful() ? 0 : 1; -} - diff --git a/lib/tests/testRFC1035.cc b/lib/tests/testRFC1035.cc index ee3684ef4e..b17ec0a48a 100644 --- a/lib/tests/testRFC1035.cc +++ b/lib/tests/testRFC1035.cc @@ -8,6 +8,7 @@ #include "squid.h" #include "testRFC1035.h" +#include "unitTestMain.h" #include diff --git a/lib/tests/testRFC1738.cc b/lib/tests/testRFC1738.cc index 640d361baf..9440900900 100644 --- a/lib/tests/testRFC1738.cc +++ b/lib/tests/testRFC1738.cc @@ -8,6 +8,7 @@ #include "squid.h" #include "testRFC1738.h" +#include "unitTestMain.h" #include diff --git a/src/Makefile.am b/src/Makefile.am index 955cad6513..bea061c87f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1093,7 +1093,6 @@ TESTS += $(check_PROGRAMS) #tests_testX_SOURCES=\ # tests/testX.h \ # tests/testX.cc \ -# tests/testMain.cc \ # X.h \ # X.cc #nodist_tests_testX_SOURCES=\ @@ -1187,7 +1186,6 @@ tests_testHttpReply_SOURCES=\ tests/stub_HttpRequest.cc \ tests/testHttpReply.cc \ tests/testHttpReply.h \ - tests/testMain.cc \ tests/stub_time.cc \ url.cc \ wordlist.h \ @@ -1320,7 +1318,6 @@ tests_testACLMaxUserIP_SOURCES= \ tests/stub_UdsOp.cc \ tests/testACLMaxUserIP.cc \ tests/testACLMaxUserIP.h \ - tests/testMain.cc \ tests/stub_time.cc \ url.cc \ URL.h \ @@ -1364,7 +1361,6 @@ tests_testACLMaxUserIP_LDFLAGS = $(LIBADD_DL) ## involved in writing tests. tests_testBoilerplate_SOURCES = \ tests/testBoilerplate.cc \ - tests/testMain.cc \ tests/testBoilerplate.h \ tests/stub_debug.cc \ tests/stub_time.cc @@ -1392,7 +1388,6 @@ tests_testCacheManager_SOURCES = \ String.cc \ tests/testCacheManager.cc \ tests/testCacheManager.h \ - tests/testMain.cc \ tests/stub_main_cc.cc \ tests/stub_ipc_Forwarder.cc \ tests/stub_store_stats.cc \ @@ -1751,7 +1746,6 @@ tests_testDiskIO_SOURCES = \ tests/stub_UdsOp.cc \ tests/testDiskIO.cc \ tests/testDiskIO.h \ - tests/testMain.cc \ tests/testStoreSupport.cc \ tests/testStoreSupport.h \ tests/stub_time.cc \ @@ -1980,7 +1974,6 @@ tests_testEvent_SOURCES = \ tests/CapturingStoreEntry.h \ tests/testEvent.cc \ tests/testEvent.h \ - tests/testMain.cc \ tests/stub_main_cc.cc \ tests/stub_ipc_Forwarder.cc \ tests/stub_libauth_acls.cc \ @@ -2223,7 +2216,6 @@ tests_testEventLoop_SOURCES = \ tests/stub_SwapDir.cc \ tests/testEventLoop.cc \ tests/testEventLoop.h \ - tests/testMain.cc \ tests/stub_main_cc.cc \ tests/stub_ipc_Forwarder.cc \ tests/stub_libauth_acls.cc \ @@ -2559,7 +2551,6 @@ tests_testHttp1Parser_SOURCES = \ tests/stub_tools.cc \ tests/testHttp1Parser.cc \ tests/testHttp1Parser.h \ - tests/testMain.cc \ tests/stub_time.cc \ wordlist.h \ wordlist.cc @@ -2592,7 +2583,6 @@ tests_testHttpRequest_SOURCES = \ tests/testHttpRequest.cc \ tests/testHttpRequestMethod.h \ tests/testHttpRequestMethod.cc \ - tests/testMain.cc \ tests/stub_DiskIOModule.cc \ tests/stub_libauth.cc \ tests/stub_main_cc.cc \ @@ -2939,7 +2929,6 @@ tests_testStore_SOURCES= \ Transients.cc \ tests/stub_tools.cc \ tests/stub_UdsOp.cc \ - tests/testMain.cc \ tests/testStore.cc \ tests/testStore.h \ tests/testStoreEntryStream.cc \ @@ -3004,7 +2993,6 @@ tests_testString_SOURCES = \ $(SBUF_SOURCE) \ SBufDetailedStats.h \ tests/stub_SBufDetailedStats.cc \ - tests/testMain.cc \ tests/testString.cc \ tests/testString.h \ cache_cf.h \ @@ -3052,7 +3040,6 @@ SWAP_TEST_DS =\ tests_testUfs_SOURCES = \ tests/testUfs.cc \ - tests/testMain.cc \ tests/testUfs.h \ tests/stub_cache_manager.cc \ tests/stub_client_db.cc \ @@ -3324,7 +3311,6 @@ tests_testRock_SOURCES = \ Transients.h \ Transients.cc \ tests/testRock.cc \ - tests/testMain.cc \ tests/testRock.h \ tests/testStoreSupport.cc \ tests/testStoreSupport.h \ @@ -3588,7 +3574,6 @@ tests_testURL_SOURCES = \ tests/testURL.h \ tests/testUriScheme.cc \ tests/testUriScheme.h \ - tests/testMain.cc \ tests/stub_time.cc \ tests/stub_EventLoop.cc \ tools.h \ @@ -3656,7 +3641,6 @@ tests_testURL_DEPENDENCIES = \ tests_testSBuf_SOURCES= \ tests/testSBuf.h \ tests/testSBuf.cc \ - tests/testMain.cc \ tests/SBufFindTest.h \ tests/SBufFindTest.cc \ $(SBUF_SOURCE) \ @@ -3694,7 +3678,6 @@ tests_testSBuf_DEPENDENCIES= $(SQUID_CPPUNIT_LA) tests_testSBufList_SOURCES= \ tests/testSBufList.h \ tests/testSBufList.cc \ - tests/testMain.cc \ $(SBUF_SOURCE) \ SBufList.h \ SBufList.cc \ @@ -3748,7 +3731,6 @@ tests_testConfigParser_SOURCES = \ ConfigParser.cc \ fatal.h \ tests/stub_fatal.cc \ - tests/testMain.cc \ tests/testConfigParser.cc \ tests/testConfigParser.h \ cache_cf.h \ @@ -3805,7 +3787,6 @@ tests_testStatHist_SOURCES = \ time.cc \ tools.h \ tests/stub_tools.cc \ - tests/testMain.cc \ tests/testStatHist.cc \ tests/testStatHist.h nodist_tests_testStatHist_SOURCES = \ diff --git a/src/base/Makefile.am b/src/base/Makefile.am index c296a2d209..39bc3287a5 100644 --- a/src/base/Makefile.am +++ b/src/base/Makefile.am @@ -44,7 +44,6 @@ testCharacterSet_SOURCES = \ testCharacterSet.h \ testCharacterSet.cc nodist_testCharacterSet_SOURCES = \ - $(top_srcdir)/src/tests/testMain.cc \ $(top_srcdir)/src/tests/stub_debug.cc \ $(top_srcdir)/src/tests/stub_MemBuf.cc \ $(top_srcdir)/src/tests/stub_cbdata.cc diff --git a/src/base/testCharacterSet.cc b/src/base/testCharacterSet.cc index 41abf3a4f7..6bebecf022 100644 --- a/src/base/testCharacterSet.cc +++ b/src/base/testCharacterSet.cc @@ -9,6 +9,8 @@ #include "squid.h" #include "base/CharacterSet.h" #include "testCharacterSet.h" +#include "unitTestMain.h" + #include diff --git a/src/fs/Makefile.am b/src/fs/Makefile.am index 97800289bd..704956ae76 100644 --- a/src/fs/Makefile.am +++ b/src/fs/Makefile.am @@ -7,6 +7,8 @@ include $(top_srcdir)/src/Common.am +AUTOMAKE_OPTIONS = subdir-objects + EXTRA_LTLIBRARIES = libaufs.la libdiskd.la libufs.la librock.la noinst_LTLIBRARIES = $(STORE_LIBS_TO_BUILD) libfs.la diff --git a/src/icmp/Makefile.am b/src/icmp/Makefile.am index 27e4d2eade..044aa5da2a 100644 --- a/src/icmp/Makefile.am +++ b/src/icmp/Makefile.am @@ -109,7 +109,6 @@ testIcmp_SOURCES = \ testIcmp.h \ testIcmp.cc nodist_testIcmp_SOURCES = \ - $(top_srcdir)/src/tests/testMain.cc \ $(top_srcdir)/src/SquidTime.h \ $(top_srcdir)/src/tests/stub_debug.cc \ $(top_srcdir)/src/time.cc \ diff --git a/src/icmp/testIcmp.cc b/src/icmp/testIcmp.cc index de9722a358..f8eee8228c 100644 --- a/src/icmp/testIcmp.cc +++ b/src/icmp/testIcmp.cc @@ -13,6 +13,8 @@ #include #include "testIcmp.h" +#include "unitTestMain.h" + CPPUNIT_TEST_SUITE_REGISTRATION( testIcmp ); diff --git a/src/ip/Makefile.am b/src/ip/Makefile.am index 117b292150..a63d29ec5b 100644 --- a/src/ip/Makefile.am +++ b/src/ip/Makefile.am @@ -31,8 +31,7 @@ testIpAddress_SOURCES= \ testAddress.h nodist_testIpAddress_SOURCES= \ $(top_srcdir)/src/tests/stub_debug.cc \ - $(top_srcdir)/src/tests/stub_tools.cc \ - $(top_srcdir)/src/tests/testMain.cc + $(top_srcdir)/src/tests/stub_tools.cc testIpAddress_LDADD= \ libip.la \ ../base/libbase.la \ diff --git a/src/ip/testAddress.cc b/src/ip/testAddress.cc index 2f36587f95..5bb5068a50 100644 --- a/src/ip/testAddress.cc +++ b/src/ip/testAddress.cc @@ -10,6 +10,8 @@ #include "ip/Address.h" #include "ip/tools.h" #include "testAddress.h" +#include "unitTestMain.h" + #include #include diff --git a/src/ipc/Makefile.am b/src/ipc/Makefile.am index 92ea21bed5..7c2281fde8 100644 --- a/src/ipc/Makefile.am +++ b/src/ipc/Makefile.am @@ -8,6 +8,8 @@ include $(top_srcdir)/src/Common.am include $(top_srcdir)/src/TestHeaders.am +AUTOMAKE_OPTIONS = subdir-objects + noinst_LTLIBRARIES = libipc.la libipc_la_SOURCES = \ diff --git a/src/parser/Makefile.am b/src/parser/Makefile.am index d3574ae5cd..125cc8a39d 100644 --- a/src/parser/Makefile.am +++ b/src/parser/Makefile.am @@ -40,7 +40,6 @@ testTokenizer_SOURCES = \ testTokenizer.cc \ Tokenizer.h nodist_testTokenizer_SOURCES = \ - $(top_srcdir)/src/tests/testMain.cc \ $(top_srcdir)/src/tests/stub_libmem.cc \ $(top_srcdir)/src/tests/stub_debug.cc \ $(top_srcdir)/src/tests/stub_time.cc \ diff --git a/src/parser/testTokenizer.cc b/src/parser/testTokenizer.cc index 77b0568baf..4e7f8451dd 100644 --- a/src/parser/testTokenizer.cc +++ b/src/parser/testTokenizer.cc @@ -10,6 +10,8 @@ #include "base/CharacterSet.h" #include "parser/Tokenizer.h" #include "testTokenizer.h" +#include "unitTestMain.h" + CPPUNIT_TEST_SUITE_REGISTRATION( testTokenizer ); diff --git a/src/tests/testACLMaxUserIP.cc b/src/tests/testACLMaxUserIP.cc index c0df8af94b..3e206af9d7 100644 --- a/src/tests/testACLMaxUserIP.cc +++ b/src/tests/testACLMaxUserIP.cc @@ -13,6 +13,7 @@ #include "auth/AclMaxUserIp.h" #include "ConfigParser.h" #include "testACLMaxUserIP.h" +#include "unitTestMain.h" #include diff --git a/src/tests/testAuth.cc b/src/tests/testAuth.cc index 4c47424535..7548a9dceb 100644 --- a/src/tests/testAuth.cc +++ b/src/tests/testAuth.cc @@ -16,6 +16,7 @@ #include "auth/UserRequest.h" #include "ConfigParser.h" #include "testAuth.h" +#include "unitTestMain.h" CPPUNIT_TEST_SUITE_REGISTRATION( testAuth ); CPPUNIT_TEST_SUITE_REGISTRATION( testAuthConfig ); diff --git a/src/tests/testBoilerplate.cc b/src/tests/testBoilerplate.cc index 87d935af20..c81037d111 100644 --- a/src/tests/testBoilerplate.cc +++ b/src/tests/testBoilerplate.cc @@ -8,6 +8,7 @@ #include "squid.h" #include "testBoilerplate.h" +#include "unitTestMain.h" #include diff --git a/src/tests/testCacheManager.cc b/src/tests/testCacheManager.cc index 53fcb8c343..1b8e58db68 100644 --- a/src/tests/testCacheManager.cc +++ b/src/tests/testCacheManager.cc @@ -11,6 +11,7 @@ #include "mgr/Action.h" #include "Store.h" #include "testCacheManager.h" +#include "unitTestMain.h" #include diff --git a/src/tests/testConfigParser.cc b/src/tests/testConfigParser.cc index a98f9297f5..9759966d63 100644 --- a/src/tests/testConfigParser.cc +++ b/src/tests/testConfigParser.cc @@ -11,6 +11,8 @@ #include "event.h" #include "SquidString.h" #include "testConfigParser.h" +#include "unitTestMain.h" + CPPUNIT_TEST_SUITE_REGISTRATION( testConfigParser); diff --git a/src/tests/testDiskIO.cc b/src/tests/testDiskIO.cc index cb48eeea61..e86e836c91 100644 --- a/src/tests/testDiskIO.cc +++ b/src/tests/testDiskIO.cc @@ -16,6 +16,8 @@ #include "SwapDir.h" #include "testDiskIO.h" #include "testStoreSupport.h" +#include "unitTestMain.h" + #include diff --git a/src/tests/testEvent.cc b/src/tests/testEvent.cc index c3174c8bfb..7b0c3d458a 100644 --- a/src/tests/testEvent.cc +++ b/src/tests/testEvent.cc @@ -15,6 +15,8 @@ #include "event.h" #include "stat.h" #include "testEvent.h" +#include "unitTestMain.h" + CPPUNIT_TEST_SUITE_REGISTRATION( testEvent ); diff --git a/src/tests/testEventLoop.cc b/src/tests/testEventLoop.cc index ed7b37893e..0255a6c5b8 100644 --- a/src/tests/testEventLoop.cc +++ b/src/tests/testEventLoop.cc @@ -16,6 +16,8 @@ #include "SquidTime.h" #include "stat.h" #include "testEventLoop.h" +#include "unitTestMain.h" + CPPUNIT_TEST_SUITE_REGISTRATION( testEventLoop ); diff --git a/src/tests/testHttp1Parser.cc b/src/tests/testHttp1Parser.cc index 70bb087354..4662733771 100644 --- a/src/tests/testHttp1Parser.cc +++ b/src/tests/testHttp1Parser.cc @@ -19,6 +19,8 @@ #include "SquidConfig.h" #include "testHttp1Parser.h" #include "testHttp1Parser.h" +#include "unitTestMain.h" + CPPUNIT_TEST_SUITE_REGISTRATION( testHttp1Parser ); diff --git a/src/tests/testHttpReply.cc b/src/tests/testHttpReply.cc index f9702ece7e..f0ef0038d6 100644 --- a/src/tests/testHttpReply.cc +++ b/src/tests/testHttpReply.cc @@ -14,6 +14,8 @@ #include "mime_header.h" #include "SquidConfig.h" #include "testHttpReply.h" +#include "unitTestMain.h" + CPPUNIT_TEST_SUITE_REGISTRATION( testHttpReply ); diff --git a/src/tests/testHttpRequest.cc b/src/tests/testHttpRequest.cc index b760d814f7..08b0ee4aed 100644 --- a/src/tests/testHttpRequest.cc +++ b/src/tests/testHttpRequest.cc @@ -14,6 +14,8 @@ #include "HttpRequest.h" #include "mime_header.h" #include "testHttpRequest.h" +#include "unitTestMain.h" + CPPUNIT_TEST_SUITE_REGISTRATION( testHttpRequest ); diff --git a/src/tests/testRock.cc b/src/tests/testRock.cc index 38b2175cf9..9e25a91f94 100644 --- a/src/tests/testRock.cc +++ b/src/tests/testRock.cc @@ -22,6 +22,8 @@ #include "SwapDir.h" #include "testRock.h" #include "testStoreSupport.h" +#include "unitTestMain.h" + #include #if HAVE_SYS_STAT_H diff --git a/src/tests/testSBuf.cc b/src/tests/testSBuf.cc index f1415165cf..2709e93ca6 100644 --- a/src/tests/testSBuf.cc +++ b/src/tests/testSBuf.cc @@ -13,6 +13,8 @@ #include "SBufStream.h" #include "SquidString.h" #include "testSBuf.h" +#include "unitTestMain.h" + #include #include diff --git a/src/tests/testSBufList.cc b/src/tests/testSBufList.cc index e9e85c28d0..03fd77cdc8 100644 --- a/src/tests/testSBufList.cc +++ b/src/tests/testSBufList.cc @@ -10,6 +10,8 @@ #include "SBufAlgos.h" #include "SBufList.h" #include "testSBufList.h" +#include "unitTestMain.h" + CPPUNIT_TEST_SUITE_REGISTRATION( testSBufList ); diff --git a/src/tests/testStatHist.cc b/src/tests/testStatHist.cc index a81d81b8d2..abcfb63997 100644 --- a/src/tests/testStatHist.cc +++ b/src/tests/testStatHist.cc @@ -9,6 +9,8 @@ #include "squid.h" #include "StatHist.h" #include "testStatHist.h" +#include "unitTestMain.h" + CPPUNIT_TEST_SUITE_REGISTRATION(testStatHist); diff --git a/src/tests/testStore.cc b/src/tests/testStore.cc index 3ea9a467de..0aa855caa5 100644 --- a/src/tests/testStore.cc +++ b/src/tests/testStore.cc @@ -9,6 +9,8 @@ #include "squid.h" #include "Store.h" #include "testStore.h" +#include "unitTestMain.h" + CPPUNIT_TEST_SUITE_REGISTRATION( testStore ); diff --git a/src/tests/testString.cc b/src/tests/testString.cc index 54599f9a79..5f19927c32 100644 --- a/src/tests/testString.cc +++ b/src/tests/testString.cc @@ -10,6 +10,8 @@ #include "event.h" #include "SquidString.h" #include "testString.h" +#include "unitTestMain.h" + CPPUNIT_TEST_SUITE_REGISTRATION( testString ); diff --git a/src/tests/testURL.cc b/src/tests/testURL.cc index 68709360ca..de02cb1177 100644 --- a/src/tests/testURL.cc +++ b/src/tests/testURL.cc @@ -12,6 +12,8 @@ #include "testURL.h" #include "URL.h" +#include "unitTestMain.h" + #include diff --git a/src/tests/testUfs.cc b/src/tests/testUfs.cc index 7edc612efc..69cd80ff6d 100644 --- a/src/tests/testUfs.cc +++ b/src/tests/testUfs.cc @@ -19,6 +19,8 @@ #include "SwapDir.h" #include "testStoreSupport.h" #include "testUfs.h" +#include "unitTestMain.h" + #include