]> git.ipfire.org Git - thirdparty/squid.git/commit - src/client_db.h
Cleanup and simplify unit tests (#336)
authorAmos Jeffries <yadij@users.noreply.github.com>
Fri, 25 Jan 2019 16:21:38 +0000 (16:21 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Fri, 25 Jan 2019 16:21:41 +0000 (16:21 +0000)
commitc1a2df00843344961d135eda01d6556b7243d5b0
tree92819c9166aba4f39fc87b1170be3e4a49708d99
parent4685e7ba556dd81facf98e6a8e5503211cff3f1a
Cleanup and simplify unit tests (#336)

Polish unit tests to reduce their dependency lists inline with
the updated test documentation requirements.

Some further cleanup of unit tests documentation based on
experience pruning existing unit tests.

 * Only the test logic files actually need to be distributed by
   a test. All files being tested are supposed to be distributed
   from elsewhere and the test should rely on that to prevent
   future issues like the base/RefCount.h bug mentioned below.

 * Starting to deprecate TESTSOURCES which is causing more
   trouble than benefit by pulling in too many needless
   dependencies. eg the globals.cc objects and symbols. Tools it
   used to provide are largely superseded by the stub mechanisms.

Add missing stub files necessary for pruning dependencies. Also
fix some bugs in existing stub files.

Fix base/RefCount.h distribution. This file was not included in
the base/libbase.la dependency list but indirectly being
distributed by the unit-test existence. Which in some builds
could cause it not to exist in generated minimal tarballs.
19 files changed:
src/Makefile.am
src/base/Makefile.am
src/client_db.h
src/snmp_agent.h
src/tests/Stub.list
src/tests/stub_HelperChildConfig.cc
src/tests/stub_HttpHeader.cc [new file with mode: 0644]
src/tests/stub_HttpRequest.cc
src/tests/stub_SBuf.cc
src/tests/stub_StatHist.cc
src/tests/stub_SwapDir.cc [deleted file]
src/tests/stub_client_db.cc
src/tests/stub_gopher.cc [new file with mode: 0644]
src/tests/stub_libhttp.cc [new file with mode: 0644]
src/tests/stub_libstore.cc [new file with mode: 0644]
src/tests/stub_store.cc
src/tests/testACLMaxUserIP.cc
src/tests/testIpAddress.cc [moved from src/tests/testAddress.cc with 99% similarity]
src/tests/testIpAddress.h [moved from src/tests/testAddress.h with 100% similarity]