This is an automated email from the ASF dual-hosted git repository.
bneradt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new d6c6d628c9 Move Catch from tests/include to lib/catch2 (#9815)
d6c6d628c9 is described below
commit d6c6d628c9acc24b0b5eba7d256bf42e559b870e
Author: JosiahWI <[email protected]>
AuthorDate: Fri Jun 9 13:29:43 2023 -0500
Move Catch from tests/include to lib/catch2 (#9815)
* Move catch.hpp from tests/include to lib/catch2
tests/ contains autests, not unit tests, so the catch header
shouldn't be isolated there. It is easier to locate in lib/
and will allow all potential CMake targets for bundled third-party
software to be in one place.
* Add copy of Catch2 license
Albeit not required, it is handy to have a copy of the license for
easy reference. Otherwise we have to open the header file and go to
a URL to find out which license it uses.
---
CMakeLists.txt | 2 +-
iocore/cache/Makefile.am | 2 +-
iocore/eventsystem/Makefile.am | 2 +-
iocore/hostdb/Makefile.am | 2 +-
iocore/io_uring/Makefile.am | 2 +-
iocore/net/Makefile.am | 2 +-
iocore/net/quic/Makefile.am | 2 +-
lib/catch2/LICENSE_1_0.txt | 23 +++++++++++++++++++++++
{tests/include => lib/catch2}/catch.hpp | 0
mgmt/rpc/Makefile.am | 4 ++--
mgmt/utils/Makefile.am | 2 +-
plugins/authproxy/Makefile.inc | 2 +-
plugins/experimental/access_control/Makefile.inc | 2 +-
plugins/experimental/cookie_remap/Makefile.inc | 2 +-
plugins/experimental/slice/Makefile.inc | 6 +++---
plugins/experimental/sslheaders/Makefile.inc | 2 +-
plugins/experimental/traffic_dump/Makefile.inc | 2 +-
plugins/experimental/uri_signing/Makefile.inc | 2 +-
plugins/prefetch/Makefile.inc | 2 +-
plugins/s3_auth/Makefile.inc | 2 +-
proxy/hdrs/Makefile.am | 6 +++---
proxy/http/Makefile.am | 6 +++---
proxy/http/remap/Makefile.am | 12 ++++++------
proxy/http2/Makefile.am | 6 +++---
proxy/http3/Makefile.am | 2 +-
proxy/logging/Makefile.am | 4 ++--
src/records/Makefile.am | 4 ++--
src/tscore/Makefile.am | 8 ++++----
src/tscore/unit_tests/test_BufferWriterFormat.cc | 1 -
src/tscore/unit_tests/test_IntrusiveHashMap.cc | 2 +-
src/tscore/unit_tests/test_ParseRules.cc | 4 ++--
src/tscpp/util/Makefile.am | 2 +-
32 files changed, 72 insertions(+), 50 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b316074ebb..119e9e3b36 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -140,7 +140,7 @@ check_symbol_exists(BIO_meth_get_destroy "openssl/bio.h"
HAVE_BIO_METH_GET_DESTR
check_symbol_exists(DH_get_2048_256 "openssl/dh.h" TS_USE_GET_DH_2048_256)
# Catch2 for tests
-set(CATCH_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/tests/include)
+set(CATCH_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/lib/catch2)
include(CTest)
diff --git a/iocore/cache/Makefile.am b/iocore/cache/Makefile.am
index 4d8b963177..418621dfc0 100644
--- a/iocore/cache/Makefile.am
+++ b/iocore/cache/Makefile.am
@@ -82,7 +82,7 @@ test_CPPFLAGS = \
-I$(abs_top_srcdir)/proxy/shared \
-I$(abs_top_srcdir)/mgmt \
-I$(abs_top_srcdir)/mgmt/utils \
- -I$(abs_top_srcdir)/tests/include \
+ -I$(abs_top_srcdir)/lib/catch2 \
@SWOC_INCLUDES@ \
$(TS_INCLUDES) \
@OPENSSL_INCLUDES@
diff --git a/iocore/eventsystem/Makefile.am b/iocore/eventsystem/Makefile.am
index 3b642e9104..aa07e3f228 100644
--- a/iocore/eventsystem/Makefile.am
+++ b/iocore/eventsystem/Makefile.am
@@ -92,7 +92,7 @@ test_CPP_FLAGS = \
-I$(abs_top_srcdir)/proxy/logging \
-I$(abs_top_srcdir)/mgmt \
-I$(abs_top_srcdir)/mgmt/utils \
- -I$(abs_top_srcdir)/tests/include \
+ -I$(abs_top_srcdir)/lib/catch2 \
@OPENSSL_INCLUDES@ @SWOC_INCLUDES@
test_LD_ADD = \
diff --git a/iocore/hostdb/Makefile.am b/iocore/hostdb/Makefile.am
index ed12bbc7fb..13ab5f2a6b 100644
--- a/iocore/hostdb/Makefile.am
+++ b/iocore/hostdb/Makefile.am
@@ -86,7 +86,7 @@ test_RefCountCache_LDADD = $(test_LD_ADD)
test_HostFile_CPPFLAGS = \
$(AM_CPPFLAGS) \
- -I$(abs_top_srcdir)/tests/include \
+ -I$(abs_top_srcdir)/lib/catch2 \
-I$(abs_top_srcdir)/proxy/http/remap
test_HostFile_LDADD = $(test_LD_ADD) @SWOC_LIBS@
diff --git a/iocore/io_uring/Makefile.am b/iocore/io_uring/Makefile.am
index 1434fd6ee4..492dfca560 100644
--- a/iocore/io_uring/Makefile.am
+++ b/iocore/io_uring/Makefile.am
@@ -39,7 +39,7 @@ test_LD_FLAGS = \
test_CPP_FLAGS = \
$(AM_CPPFLAGS) \
$(iocore_include_dirs) \
- -I$(abs_top_srcdir)/tests/include
+ -I$(abs_top_srcdir)/lib/catch2
test_LD_ADD = \
$(top_builddir)/src/tscore/libtscore.la \
diff --git a/iocore/net/Makefile.am b/iocore/net/Makefile.am
index 028710424a..c9a1b2bc39 100644
--- a/iocore/net/Makefile.am
+++ b/iocore/net/Makefile.am
@@ -97,7 +97,7 @@ test_libinknet_SOURCES = \
test_libinknet_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(iocore_include_dirs) \
- -I$(abs_top_srcdir)/tests/include \
+ -I$(abs_top_srcdir)/lib/catch2 \
-I$(abs_top_srcdir)/proxy \
-I$(abs_top_srcdir)/proxy/hdrs \
-I$(abs_top_srcdir)/proxy/http \
diff --git a/iocore/net/quic/Makefile.am b/iocore/net/quic/Makefile.am
index c4602009dc..2c6473aae9 100644
--- a/iocore/net/quic/Makefile.am
+++ b/iocore/net/quic/Makefile.am
@@ -58,7 +58,7 @@ check_PROGRAMS := test_MTHashTable
test_MTHashTable_CPPFLAGS = \
$(AM_CPPFLAGS) \
- -I$(abs_top_srcdir)/tests/include
+ -I$(abs_top_srcdir)/lib/catch2
test_MTHashTable_LDADD = \
$(top_builddir)/iocore/eventsystem/libinkevent.a \
diff --git a/lib/catch2/LICENSE_1_0.txt b/lib/catch2/LICENSE_1_0.txt
new file mode 100644
index 0000000000..36b7cd93cd
--- /dev/null
+++ b/lib/catch2/LICENSE_1_0.txt
@@ -0,0 +1,23 @@
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
diff --git a/tests/include/catch.hpp b/lib/catch2/catch.hpp
similarity index 100%
rename from tests/include/catch.hpp
rename to lib/catch2/catch.hpp
diff --git a/mgmt/rpc/Makefile.am b/mgmt/rpc/Makefile.am
index 04c4145d60..e19ec91090 100644
--- a/mgmt/rpc/Makefile.am
+++ b/mgmt/rpc/Makefile.am
@@ -53,7 +53,7 @@ libjsonrpc_protocol_la_SOURCES = \
test_jsonrpc_CPPFLAGS = \
$(AM_CPPFLAGS) \
- -I$(abs_top_srcdir)/tests/include \
+ -I$(abs_top_srcdir)/lib/catch2 \
@YAMLCPP_INCLUDES@
test_jsonrpc_LDFLAGS = \
@@ -92,7 +92,7 @@ libjsonrpc_server_la_SOURCES = \
test_jsonrpcserver_CPPFLAGS = \
$(AM_CPPFLAGS) \
- -I$(abs_top_srcdir)/tests/include \
+ -I$(abs_top_srcdir)/lib/catch2 \
-I$(abs_top_srcdir)/tests \
@YAMLCPP_INCLUDES@
diff --git a/mgmt/utils/Makefile.am b/mgmt/utils/Makefile.am
index 32e226e495..245539bba3 100644
--- a/mgmt/utils/Makefile.am
+++ b/mgmt/utils/Makefile.am
@@ -51,7 +51,7 @@ libutils_lm_la_SOURCES = \
libutils_p_la_SOURCES = \
$(libutils_COMMON)
-test_mgmt_utils_CPPFLAGS = $(AM_CPPFLAGS) -I$(abs_top_srcdir)/tests/include
+test_mgmt_utils_CPPFLAGS = $(AM_CPPFLAGS) -I$(abs_top_srcdir)/lib/catch2
test_mgmt_utils_LDFLAGS = \
@AM_LDFLAGS@ \
diff --git a/plugins/authproxy/Makefile.inc b/plugins/authproxy/Makefile.inc
index 9e2e5693ef..9b5e5dfffa 100644
--- a/plugins/authproxy/Makefile.inc
+++ b/plugins/authproxy/Makefile.inc
@@ -21,5 +21,5 @@ authproxy_authproxy_la_SOURCES = \
authproxy/utils.h
check_PROGRAMS += authproxy/authproxy_test
-authproxy_authproxy_test_CPPFLAGS = $(AM_CPPFLAGS)
-I$(abs_top_srcdir)/tests/include
+authproxy_authproxy_test_CPPFLAGS = $(AM_CPPFLAGS)
-I$(abs_top_srcdir)/lib/catch2
authproxy_authproxy_test_SOURCES = authproxy/tests/authproxy_test.cc
diff --git a/plugins/experimental/access_control/Makefile.inc
b/plugins/experimental/access_control/Makefile.inc
index 92d799f2b7..c61c0480cc 100644
--- a/plugins/experimental/access_control/Makefile.inc
+++ b/plugins/experimental/access_control/Makefile.inc
@@ -27,7 +27,7 @@ experimental_access_control_access_control_la_SOURCES = \
check_PROGRAMS += experimental/access_control/test_access_control
-experimental_access_control_test_access_control_CPPFLAGS = $(AM_CPPFLAGS)
-I$(abs_top_srcdir)/tests/include -DACCESS_CONTROL_UNIT_TEST
+experimental_access_control_test_access_control_CPPFLAGS = $(AM_CPPFLAGS)
-I$(abs_top_srcdir)/lib/catch2 -DACCESS_CONTROL_UNIT_TEST
experimental_access_control_test_access_control_LDADD = $(OPENSSL_LIBS)
$(top_builddir)/src/tscore/libtscore.la
experimental_access_control_test_access_control_SOURCES = \
diff --git a/plugins/experimental/cookie_remap/Makefile.inc
b/plugins/experimental/cookie_remap/Makefile.inc
index 266cc9e407..919eb282df 100644
--- a/plugins/experimental/cookie_remap/Makefile.inc
+++ b/plugins/experimental/cookie_remap/Makefile.inc
@@ -30,7 +30,7 @@ AM_CPPFLAGS += @YAMLCPP_INCLUDES@
check_PROGRAMS += \
experimental/cookie_remap/test_cookiejar
-experimental_cookie_remap_test_cookiejar_CPPFLAGS = $(AM_CPPFLAGS)
-Iexperimental/cookie_remap -I$(abs_top_srcdir)/tests/include
+experimental_cookie_remap_test_cookiejar_CPPFLAGS = $(AM_CPPFLAGS)
-Iexperimental/cookie_remap -I$(abs_top_srcdir)/lib/catch2
experimental_cookie_remap_test_cookiejar_SOURCES = \
experimental/cookie_remap/test_cookiejar.cc \
experimental/cookie_remap/strip.cc \
diff --git a/plugins/experimental/slice/Makefile.inc
b/plugins/experimental/slice/Makefile.inc
index f02631e204..1cc44e5b2e 100644
--- a/plugins/experimental/slice/Makefile.inc
+++ b/plugins/experimental/slice/Makefile.inc
@@ -46,7 +46,7 @@ experimental_slice_slice_la_SOURCES = \
check_PROGRAMS += experimental/slice/test_content_range
-experimental_slice_test_content_range_CPPFLAGS = $(AM_CPPFLAGS)
-I$(abs_top_srcdir)/tests/include -DUNITTEST
+experimental_slice_test_content_range_CPPFLAGS = $(AM_CPPFLAGS)
-I$(abs_top_srcdir)/lib/catch2 -DUNITTEST
experimental_slice_test_content_range_SOURCES = \
experimental/slice/unit-tests/test_content_range.cc \
experimental/slice/ContentRange.cc
@@ -55,7 +55,7 @@ experimental_slice_test_content_range_LDADD = @LIBPCRE@
check_PROGRAMS += experimental/slice/test_range
-experimental_slice_test_range_CPPFLAGS = $(AM_CPPFLAGS)
-I$(abs_top_srcdir)/tests/include -DUNITTEST
+experimental_slice_test_range_CPPFLAGS = $(AM_CPPFLAGS)
-I$(abs_top_srcdir)/lib/catch2 -DUNITTEST
experimental_slice_test_range_SOURCES = \
experimental/slice/unit-tests/test_range.cc \
experimental/slice/Range.cc
@@ -64,7 +64,7 @@ experimental_slice_test_range_LDADD = @LIBPCRE@
check_PROGRAMS += experimental/slice/test_config
-experimental_slice_test_config_CPPFLAGS = $(AM_CPPFLAGS)
-I$(abs_top_srcdir)/tests/include -DUNITTEST
+experimental_slice_test_config_CPPFLAGS = $(AM_CPPFLAGS)
-I$(abs_top_srcdir)/lib/catch2 -DUNITTEST
experimental_slice_test_config_SOURCES = \
experimental/slice/unit-tests/test_config.cc \
experimental/slice/Config.cc
diff --git a/plugins/experimental/sslheaders/Makefile.inc
b/plugins/experimental/sslheaders/Makefile.inc
index c15761cdb8..a2178a7d7e 100644
--- a/plugins/experimental/sslheaders/Makefile.inc
+++ b/plugins/experimental/sslheaders/Makefile.inc
@@ -47,7 +47,7 @@ experimental_sslheaders_test_sslheaders_SOURCES = \
experimental_sslheaders_test_sslheaders_CPPFLAGS = \
$(AM_CPPFLAGS) \
@OPENSSL_INCLUDES@ \
- -I$(abs_top_srcdir)/tests/include \
+ -I$(abs_top_srcdir)/lib/catch2 \
-I$(abs_top_srcdir)/include
experimental_sslheaders_test_sslheaders_LDFLAGS = @OPENSSL_LDFLAGS@
experimental_sslheaders_test_sslheaders_LDADD = \
diff --git a/plugins/experimental/traffic_dump/Makefile.inc
b/plugins/experimental/traffic_dump/Makefile.inc
index 411a9f7819..ea843bbe8a 100644
--- a/plugins/experimental/traffic_dump/Makefile.inc
+++ b/plugins/experimental/traffic_dump/Makefile.inc
@@ -33,7 +33,7 @@ check_PROGRAMS += \
experimental_traffic_dump_test_traffic_dump_CPPFLAGS = \
$(AM_CPPFLAGS) \
-I$(abs_top_srcdir)/plugins/experimental/traffic_dump \
- -I$(abs_top_srcdir)/tests/include
+ -I$(abs_top_srcdir)/lib/catch2
experimental_traffic_dump_test_traffic_dump_SOURCES = \
experimental/traffic_dump/unit_tests/unit_test_main.cc \
diff --git a/plugins/experimental/uri_signing/Makefile.inc
b/plugins/experimental/uri_signing/Makefile.inc
index fd2eae32e0..8bba1987f1 100644
--- a/plugins/experimental/uri_signing/Makefile.inc
+++ b/plugins/experimental/uri_signing/Makefile.inc
@@ -32,7 +32,7 @@ check_PROGRAMS += experimental/uri_signing/test_uri_signing
experimental_uri_signing_test_uri_signing_CPPFLAGS = \
$(AM_CPPFLAGS) \
- -I$(abs_top_srcdir)/tests/include \
+ -I$(abs_top_srcdir)/lib/catch2 \
-DURI_SIGNING_UNIT_TEST \
-DSRCDIR=\"$(srcdir)\"
diff --git a/plugins/prefetch/Makefile.inc b/plugins/prefetch/Makefile.inc
index e2e562938c..7b98ac1706 100644
--- a/plugins/prefetch/Makefile.inc
+++ b/plugins/prefetch/Makefile.inc
@@ -29,5 +29,5 @@ prefetch_prefetch_la_SOURCES = \
check_PROGRAMS += prefetch/test_evaluate
-prefetch_test_evaluate_CPPFLAGS = $(AM_CPPFLAGS)
-I$(abs_top_srcdir)/tests/include -DPREFETCH_UNIT_TEST
+prefetch_test_evaluate_CPPFLAGS = $(AM_CPPFLAGS)
-I$(abs_top_srcdir)/lib/catch2 -DPREFETCH_UNIT_TEST
prefetch_test_evaluate_SOURCES = prefetch/test/test_evaluate.cc
prefetch/evaluate.cc prefetch/common.cc
diff --git a/plugins/s3_auth/Makefile.inc b/plugins/s3_auth/Makefile.inc
index b17ab21d7a..c8dbd4d204 100644
--- a/plugins/s3_auth/Makefile.inc
+++ b/plugins/s3_auth/Makefile.inc
@@ -19,7 +19,7 @@ s3_auth_s3_auth_la_SOURCES = s3_auth/s3_auth.cc
s3_auth/aws_auth_v4.cc
check_PROGRAMS += s3_auth/test_s3auth
-s3_auth_test_s3auth_CPPFLAGS = $(AM_CPPFLAGS)
-I$(abs_top_srcdir)/tests/include -DAWS_AUTH_V4_UNIT_TEST
+s3_auth_test_s3auth_CPPFLAGS = $(AM_CPPFLAGS) -I$(abs_top_srcdir)/lib/catch2
-DAWS_AUTH_V4_UNIT_TEST
s3_auth_test_s3auth_LDADD = $(OPENSSL_LIBS)
s3_auth_test_s3auth_SOURCES = \
s3_auth/unit_tests/test_aws_auth_v4.cc \
diff --git a/proxy/hdrs/Makefile.am b/proxy/hdrs/Makefile.am
index b52058628e..736e52865b 100644
--- a/proxy/hdrs/Makefile.am
+++ b/proxy/hdrs/Makefile.am
@@ -72,7 +72,7 @@ check_PROGRAMS = \
TESTS = $(check_PROGRAMS)
test_proxy_hdrs_CPPFLAGS = $(AM_CPPFLAGS) \
- -I$(abs_top_srcdir)/tests/include
+ -I$(abs_top_srcdir)/lib/catch2
test_proxy_hdrs_SOURCES = \
unit_tests/unit_test_main.cc \
@@ -92,7 +92,7 @@ test_proxy_hdrs_LDADD = \
@LIBCAP@
test_hdr_heap_CPPFLAGS = $(AM_CPPFLAGS) \
- -I$(abs_top_srcdir)/tests/include
+ -I$(abs_top_srcdir)/lib/catch2
test_hdr_heap_SOURCES = \
unit_tests/unit_test_main.cc \
@@ -119,7 +119,7 @@ test_Huffmancode_SOURCES = \
test_XPACK_CPPFLAGS = \
$(AM_CPPFLAGS) \
- -I$(abs_top_srcdir)/tests/include
+ -I$(abs_top_srcdir)/lib/catch2
test_XPACK_LDADD = \
$(top_builddir)/src/tscore/libtscore.la \
diff --git a/proxy/http/Makefile.am b/proxy/http/Makefile.am
index c0a0cae54f..6ccffe754f 100644
--- a/proxy/http/Makefile.am
+++ b/proxy/http/Makefile.am
@@ -93,7 +93,7 @@ check_PROGRAMS = test_proxy_http test_PreWarm
test_HttpTransact
TESTS = $(check_PROGRAMS)
test_proxy_http_CPPFLAGS = $(AM_CPPFLAGS)\
- -I$(abs_top_srcdir)/tests/include
+ -I$(abs_top_srcdir)/lib/catch2
test_proxy_http_SOURCES = \
unit_tests/unit_test_main.cc \
@@ -116,7 +116,7 @@ test_proxy_http_LDADD = \
test_PreWarm_CPPFLAGS = \
$(AM_CPPFLAGS) \
- -I$(abs_top_srcdir)/tests/include
+ -I$(abs_top_srcdir)/lib/catch2
test_PreWarm_LDADD = \
$(top_builddir)/src/tscore/libtscore.la
@@ -126,7 +126,7 @@ test_PreWarm_SOURCES = \
test_HttpTransact_CPPFLAGS = \
$(AM_CPPFLAGS) \
- -I$(abs_top_srcdir)/tests/include
+ -I$(abs_top_srcdir)/lib/catch2
if OS_LINUX
test_HttpTransact_LDFLAGS = $(AM_LDFLAGS)
diff --git a/proxy/http/remap/Makefile.am b/proxy/http/remap/Makefile.am
index 7d122aa62b..c15a537f60 100644
--- a/proxy/http/remap/Makefile.am
+++ b/proxy/http/remap/Makefile.am
@@ -85,7 +85,7 @@ check_PROGRAMS = test_NextHopStrategyFactory
test_NextHopRoundRobin test_NextHo
if EXPENSIVE_TESTS
check_PROGRAMS += test_PluginFactory test_PluginDso test_RemapPluginInfo
-test_PluginDso_CPPFLAGS = $(AM_CPPFLAGS) -I$(abs_top_srcdir)/tests/include
-DPLUGIN_DSO_TESTS
+test_PluginDso_CPPFLAGS = $(AM_CPPFLAGS) -I$(abs_top_srcdir)/lib/catch2
-DPLUGIN_DSO_TESTS
test_PluginDso_LIBTOOLFLAGS = --preserve-dup-deps
EXTRA_test_PluginDso_DEPENDENCIES = unit-tests/plugin_v1.la
test_PluginDso_LDADD = $(COMMON_PLUGINDSO_LDADDS)
@@ -95,7 +95,7 @@ test_PluginDso_SOURCES = \
unit-tests/plugin_testing_common.cc \
PluginDso.cc
-test_PluginFactory_CPPFLAGS = $(AM_CPPFLAGS) -I$(abs_top_srcdir)/tests/include
-DPLUGIN_DSO_TESTS
+test_PluginFactory_CPPFLAGS = $(AM_CPPFLAGS) -I$(abs_top_srcdir)/lib/catch2
-DPLUGIN_DSO_TESTS
test_PluginFactory_LIBTOOLFLAGS = --preserve-dup-deps
EXTRA_test_PluginFactory_DEPENDENCIES = \
unit-tests/plugin_v1.la \
@@ -110,7 +110,7 @@ test_PluginFactory_SOURCES = \
PluginDso.cc \
RemapPluginInfo.cc
-test_RemapPluginInfo_CPPFLAGS = $(AM_CPPFLAGS)
-I$(abs_top_srcdir)/tests/include -DPLUGIN_DSO_TESTS
+test_RemapPluginInfo_CPPFLAGS = $(AM_CPPFLAGS) -I$(abs_top_srcdir)/lib/catch2
-DPLUGIN_DSO_TESTS
test_RemapPluginInfo_LIBTOOLFLAGS = --preserve-dup-deps
EXTRA_test_RemapPluginInfo_DEPENDENCIES = \
unit-tests/plugin_missing_init.la \
@@ -132,7 +132,7 @@ test_NextHopStrategyFactory_CPPFLAGS = \
$(AM_CPPFLAGS) \
-D_NH_UNIT_TESTS_ \
-DTS_SRC_DIR=\"$(abs_top_srcdir)/proxy/http/remap/\" \
- -I$(abs_top_srcdir)/tests/include \
+ -I$(abs_top_srcdir)/lib/catch2 \
$(TS_INCLUDES) \
@YAMLCPP_INCLUDES@
@@ -163,7 +163,7 @@ test_NextHopRoundRobin_CPPFLAGS = \
$(AM_CPPFLAGS) \
-D_NH_UNIT_TESTS_ \
-DTS_SRC_DIR=\"$(abs_top_srcdir)/proxy/http/remap/\" \
- -I$(abs_top_srcdir)/tests/include \
+ -I$(abs_top_srcdir)/lib/catch2 \
$(TS_INCLUDES) \
@YAMLCPP_INCLUDES@
@@ -194,7 +194,7 @@ test_NextHopConsistentHash_CPPFLAGS = \
$(AM_CPPFLAGS) \
-D_NH_UNIT_TESTS_ \
-DTS_SRC_DIR=\"$(abs_top_srcdir)/proxy/http/remap/\" \
- -I$(abs_top_srcdir)/tests/include \
+ -I$(abs_top_srcdir)/lib/catch2 \
$(TS_INCLUDES) \
@YAMLCPP_INCLUDES@
diff --git a/proxy/http2/Makefile.am b/proxy/http2/Makefile.am
index a6dae126a9..d07c2c4b54 100644
--- a/proxy/http2/Makefile.am
+++ b/proxy/http2/Makefile.am
@@ -90,7 +90,7 @@ test_libhttp2_LDFLAGS = $(AM_LDFLAGS)\
endif
test_libhttp2_CPPFLAGS = $(AM_CPPFLAGS)\
- -I$(abs_top_srcdir)/tests/include
+ -I$(abs_top_srcdir)/lib/catch2
test_libhttp2_SOURCES = \
unit_tests/test_HTTP2.cc \
@@ -104,7 +104,7 @@ test_Http2DependencyTree_LDADD = \
@SWOC_LIBS@
test_Http2DependencyTree_CPPFLAGS = $(AM_CPPFLAGS)\
- -I$(abs_top_srcdir)/tests/include
+ -I$(abs_top_srcdir)/lib/catch2
test_Http2DependencyTree_SOURCES = \
unit_tests/test_Http2DependencyTree.cc \
@@ -117,7 +117,7 @@ test_Http2FrequencyCounter_LDADD = \
@SWOC_LIBS@
test_Http2FrequencyCounter_CPPFLAGS = $(AM_CPPFLAGS)\
- -I$(abs_top_srcdir)/tests/include
+ -I$(abs_top_srcdir)/lib/catch2
test_Http2FrequencyCounter_SOURCES = \
unit_tests/test_Http2FrequencyCounter.cc \
diff --git a/proxy/http3/Makefile.am b/proxy/http3/Makefile.am
index 7966122801..41781dbcf3 100644
--- a/proxy/http3/Makefile.am
+++ b/proxy/http3/Makefile.am
@@ -66,7 +66,7 @@ TESTS = $(check_PROGRAMS)
test_CPPFLAGS = \
$(AM_CPPFLAGS) \
-I$(abs_top_srcdir)/proxy/logging \
- -I$(abs_top_srcdir)/tests/include
+ -I$(abs_top_srcdir)/lib/catch2
test_LDADD = \
$(top_builddir)/iocore/net/quic/libquic.a \
diff --git a/proxy/logging/Makefile.am b/proxy/logging/Makefile.am
index e0576e640d..5ef778c608 100644
--- a/proxy/logging/Makefile.am
+++ b/proxy/logging/Makefile.am
@@ -75,7 +75,7 @@ TESTS = $(check_PROGRAMS)
test_LogUtils_CPPFLAGS = \
$(AM_CPPFLAGS) \
-DTEST_LOG_UTILS \
- -I$(abs_top_srcdir)/tests/include
+ -I$(abs_top_srcdir)/lib/catch2
test_LogUtils_SOURCES = \
LogUtils.cc \
@@ -90,7 +90,7 @@ test_LogUtils_LDADD = \
test_RolledLogDeleter_CPPFLAGS = \
$(AM_CPPFLAGS) \
-DTEST_LOG_UTILS \
- -I$(abs_top_srcdir)/tests/include
+ -I$(abs_top_srcdir)/lib/catch2
test_RolledLogDeleter_SOURCES = \
RolledLogDeleter.cc \
diff --git a/src/records/Makefile.am b/src/records/Makefile.am
index 15c64dce4f..d9c012263c 100644
--- a/src/records/Makefile.am
+++ b/src/records/Makefile.am
@@ -61,7 +61,7 @@ librecords_p_a_SOURCES = $(librecords_COMMON)
TESTS = $(check_PROGRAMS)
test_librecords_CPPFLAGS = $(AM_CPPFLAGS)\
- -I$(abs_top_srcdir)/tests/include
+ -I$(abs_top_srcdir)/lib/catch2
test_librecords_SOURCES = \
unit_tests/unit_test_main.cc \
@@ -75,7 +75,7 @@ test_librecords_LDADD = \
@SWOC_LIBS@ @HWLOC_LIBS@ @LIBCAP@ @YAMLCPP_LIBS@
test_librecords_on_eventsystem_CPPFLAGS = $(AM_CPPFLAGS)\
- -I$(abs_top_srcdir)/tests/include
+ -I$(abs_top_srcdir)/lib/catch2
test_librecords_on_eventsystem_SOURCES = \
unit_tests/unit_test_main_on_eventsystem.cc \
diff --git a/src/tscore/Makefile.am b/src/tscore/Makefile.am
index 2bf5a911a3..39caa509f7 100644
--- a/src/tscore/Makefile.am
+++ b/src/tscore/Makefile.am
@@ -155,12 +155,12 @@ test_freelist_LDADD = libtscore.la
$(top_builddir)/src/tscpp/util/libtscpputil.l
test_geometry_SOURCES = test_geometry.cc
test_geometry_LDADD = libtscore.la
$(top_builddir)/src/tscpp/util/libtscpputil.la @SWOC_LIBS@ @LIBPCRE@ -lstdc++
-test_X509HostnameValidator_CPPFLAGS = $(AM_CPPFLAGS)
-I$(abs_top_srcdir)/tests/include
+test_X509HostnameValidator_CPPFLAGS = $(AM_CPPFLAGS)
-I$(abs_top_srcdir)/lib/catch2
test_X509HostnameValidator_LDADD = libtscore.la
$(top_builddir)/src/tscpp/util/libtscpputil.la @SWOC_LIBS@ @LIBPCRE@
@OPENSSL_LIBS@
test_X509HostnameValidator_SOURCES = unit_tests/test_X509HostnameValidator.cc
test_tscore_CPPFLAGS = $(AM_CPPFLAGS)\
- -I$(abs_top_srcdir)/tests/include
+ -I$(abs_top_srcdir)/lib/catch2
test_tscore_CXXFLAGS = -Wno-array-bounds $(AM_CXXFLAGS)
test_tscore_LDADD = libtscore.la
$(top_builddir)/src/tscpp/util/libtscpputil.la @SWOC_LIBS@ @OPENSSL_LIBS@
@@ -200,11 +200,11 @@ test_tscore_SOURCES += \
unit_tests/test_HKDF.cc
endif
-freelist_benchmark_CXXFLAGS = -Wno-array-bounds $(AM_CXXFLAGS)
-I$(abs_top_srcdir)/tests/include
+freelist_benchmark_CXXFLAGS = -Wno-array-bounds $(AM_CXXFLAGS)
-I$(abs_top_srcdir)/lib/catch2
freelist_benchmark_LDADD = libtscore.la @HWLOC_LIBS@
freelist_benchmark_SOURCES = unit_tests/freelist_benchmark.cc
-benchmark_shared_mutex_CXXFLAGS = -Wno-array-bounds $(AM_CXXFLAGS)
-I$(abs_top_srcdir)/tests/include
+benchmark_shared_mutex_CXXFLAGS = -Wno-array-bounds $(AM_CXXFLAGS)
-I$(abs_top_srcdir)/lib/catch2
benchmark_shared_mutex_LDADD = libtscore.la
benchmark_shared_mutex_SOURCES = unit_tests/benchmark_shared_mutex.cc
diff --git a/src/tscore/unit_tests/test_BufferWriterFormat.cc
b/src/tscore/unit_tests/test_BufferWriterFormat.cc
index 26bec8bdd7..8a91d34b5d 100644
--- a/src/tscore/unit_tests/test_BufferWriterFormat.cc
+++ b/src/tscore/unit_tests/test_BufferWriterFormat.cc
@@ -22,7 +22,6 @@
*/
#include "catch.hpp"
-#include "../../../tests/include/catch.hpp"
#include <chrono>
#include <iostream>
#include <netinet/in.h>
diff --git a/src/tscore/unit_tests/test_IntrusiveHashMap.cc
b/src/tscore/unit_tests/test_IntrusiveHashMap.cc
index 8223be3624..97843515cd 100644
--- a/src/tscore/unit_tests/test_IntrusiveHashMap.cc
+++ b/src/tscore/unit_tests/test_IntrusiveHashMap.cc
@@ -28,7 +28,7 @@
#include <random>
#include <tscore/IntrusiveHashMap.h>
#include <tscore/BufferWriter.h>
-#include "../../../tests/include/catch.hpp"
+#include "catch.hpp"
// -------------
// --- TESTS ---
diff --git a/src/tscore/unit_tests/test_ParseRules.cc
b/src/tscore/unit_tests/test_ParseRules.cc
index f1f73c731b..d0d0d33396 100644
--- a/src/tscore/unit_tests/test_ParseRules.cc
+++ b/src/tscore/unit_tests/test_ParseRules.cc
@@ -21,7 +21,7 @@
limitations under the License.
*/
-#include "../../../tests/include/catch.hpp"
+#include "catch.hpp"
#include <tscore/ParseRules.h>
#include <iostream>
@@ -90,4 +90,4 @@ TEST_CASE("parse_rules", "[libts][parse_rules]")
REQUIRE(value == 0);
REQUIRE(*end != '\0');
}
-}
\ No newline at end of file
+}
diff --git a/src/tscpp/util/Makefile.am b/src/tscpp/util/Makefile.am
index 5845a2e41c..35a1124d7b 100644
--- a/src/tscpp/util/Makefile.am
+++ b/src/tscpp/util/Makefile.am
@@ -33,7 +33,7 @@ libtscpputil_la_SOURCES = \
ts_diags.cc ts_ip.cc TextView.cc YamlCfg.cc ts_unit_parser.cc
test_tscpputil_CPPFLAGS = $(AM_CPPFLAGS)\
- -I$(abs_top_srcdir)/tests/include @SWOC_INCLUDES@
+ -I$(abs_top_srcdir)/lib/catch2 @SWOC_INCLUDES@
test_tscpputil_CXXFLAGS = -Wno-array-bounds $(AM_CXXFLAGS)
test_tscpputil_LDADD = \