Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to build regression tests #9863

Merged
merged 1 commit into from
Jun 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ execute_process(COMMAND id -ng OUTPUT_VARIABLE BUILD_GROUP OUTPUT_STRIP_TRAILING
execute_process(COMMAND uname -n OUTPUT_VARIABLE BUILD_MACHINE OUTPUT_STRIP_TRAILING_WHITESPACE)

# Options
option(BUILD_REGRESSION_TESTING "Build regression tests (default ON)" ON)
set(DEFAULT_STACK_SIZE 1048576 CACHE STRING "Default stack size (default 1048576)")
option(ENABLE_FAST_SDK "Use fast SDK APIs (default OFF)")
option(ENABLE_JEMALLOC "Use jemalloc (default OFF)")
Expand Down Expand Up @@ -207,6 +208,7 @@ check_symbol_exists(SSL_CTX_set_tlsext_ticket_key_cb openssl/ssl.h HAVE_SSL_CTX_
set(CATCH_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/lib/catch2)

include(CTest)
set(TS_HAS_TESTS ${BUILD_REGRESSION_TESTING})

message("Configuring for ${HOST_OS}")

Expand Down
1 change: 1 addition & 0 deletions include/tscore/ink_config.h.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const int DEFAULT_STACKSIZE = @DEFAULT_STACK_SIZE@;
#cmakedefine01 TS_HAS_IN6_IS_ADDR_UNSPECIFIED
#cmakedefine01 TS_HAS_JEMALLOC
#cmakedefine01 TS_HAS_TCMALLOC
#cmakedefine01 TS_HAS_TESTS
#cmakedefine01 TS_HAS_PROFILER
#cmakedefine01 TS_USE_DIAGS
#cmakedefine01 TS_USE_EPOLL
Expand Down
3 changes: 3 additions & 0 deletions iocore/cache/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ add_library(inkcache STATIC
RamCacheLRU.cc
Store.cc
)
if(BUILD_REGRESSION_TESTING)
target_sources(inkcache PRIVATE CacheTest.cc)
endif()
target_link_libraries(inkcache PRIVATE ZLIB::ZLIB)
if(HAVE_LZMA_H)
target_link_libraries(inkcache PRIVATE LibLZMA::LibLZMA)
Expand Down
3 changes: 3 additions & 0 deletions iocore/net/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ add_library(inknet STATIC
SSLDynlock.cc
SNIActionPerformer.cc
)
if(BUILD_REGRESSION_TESTING)
target_sources(inknet PRIVATE NetVCTest.cc)
endif()
target_link_libraries(inknet PUBLIC inkevent records_p)
target_compile_options(inknet PUBLIC -Wno-deprecated-declarations)
target_include_directories(inknet PRIVATE
Expand Down
4 changes: 3 additions & 1 deletion proxy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ add_library(proxy STATIC
StatPages.cc
Transform.cc
)

if(BUILD_REGRESSION_TESTING)
target_sources(proxy PRIVATE RegressionSM.cc)
endif()
set(PROXY_INCLUDE_DIRS
${CMAKE_SOURCE_DIR}/proxy
${CMAKE_SOURCE_DIR}/proxy/http
Expand Down
6 changes: 5 additions & 1 deletion proxy/http/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@ add_library(http STATIC
PreWarmConfig.cc
PreWarmManager.cc
)
if(BUILD_REGRESSION_TESTING)
target_sources(http PRIVATE RegressionHttpTransact.cc)
endif()

target_include_directories(http PRIVATE
${IOCORE_INCLUDE_DIRS}
${PROXY_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/mgmt
${CMAKE_SOURCE_DIR}/mgmt/utils
${YAMLCPP_INCLUDE_DIR}
)
add_subdirectory(remap)
add_subdirectory(remap)