diff --git a/proxy/logging/CMakeLists.txt b/proxy/logging/CMakeLists.txt index 437f17b7b2b..ab5836d23af 100644 --- a/proxy/logging/CMakeLists.txt +++ b/proxy/logging/CMakeLists.txt @@ -48,3 +48,22 @@ target_link_libraries(logging ts::tscore yaml-cpp::yaml-cpp ) + +add_executable(test_LogUtils + LogUtils.cc + unit-tests/test_LogUtils.cc +) +target_compile_definitions(test_LogUtils PRIVATE TEST_LOG_UTILS) +target_include_directories(test_LogUtils PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) +target_link_libraries(test_LogUtils tscore records catch2::catch2) +add_test(NAME test_LogUtils COMMAND test_LogUtils) + +add_executable(test_RolledLogDeleter + LogUtils.cc + RolledLogDeleter.cc + unit-tests/test_LogUtils.cc +) +target_compile_definitions(test_RolledLogDeleter PRIVATE TEST_LOG_UTILS) +target_include_directories(test_RolledLogDeleter PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) +target_link_libraries(test_RolledLogDeleter tscore records catch2::catch2) +add_test(NAME test_RolledLogDeleter COMMAND test_RolledLogDeleter)