Skip to content

Commit c9eacd5

Browse files
committed
cleanup and allow passing properites
1 parent f1f8bce commit c9eacd5

33 files changed

Lines changed: 56 additions & 56 deletions

File tree

lib/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ if(BUILD_TESTING)
5151
# macro allows us to add common command line arguments to all tests. For now,
5252
# we ensure declaration order execution via --order decl.
5353
macro(add_catch2_test)
54-
cmake_parse_arguments(CATCH2_TEST "" "NAME" "COMMAND" ${ARGN})
55-
catch_discover_tests(${CATCH2_TEST_NAME})
54+
cmake_parse_arguments(CATCH2_TEST "" "NAME" "" ${ARGN})
55+
catch_discover_tests(${CATCH2_TEST_NAME} ${ARGN})
5656
endmacro()
5757
endif()
5858

lib/swoc/unit_tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ if(CMAKE_COMPILER_IS_GNUCXX)
4747
endif()
4848
endif()
4949

50-
add_catch2_test(NAME test_libswoc COMMAND test_libswoc)
50+
add_catch2_test(NAME test_libswoc)

plugins/cachekey/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ if(BUILD_TESTING)
2727
target_include_directories(pattern_test PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
2828
target_compile_definitions(pattern_test PRIVATE CACHEKEY_UNIT_TEST)
2929
target_link_libraries(pattern_test PRIVATE Catch2::Catch2WithMain PCRE::PCRE libswoc::libswoc ts::tsutil)
30-
add_catch2_test(NAME pattern_test COMMAND pattern_test)
30+
add_catch2_test(NAME pattern_test)
3131
endif()

plugins/esi/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ target_link_libraries(esitest PUBLIC esi-common esicore)
2121
macro(ADD_ESI_TEST NAME)
2222
add_executable(${NAME} print_funcs.cc ${ARGN})
2323
target_link_libraries(${NAME} PRIVATE esitest)
24-
add_catch2_test(NAME ${NAME} COMMAND $<TARGET_FILE:${NAME}>)
24+
add_catch2_test(NAME ${NAME})
2525
endmacro()
2626

2727
add_esi_test(test_docnode_esi docnode_test.cc)

plugins/experimental/access_control/unit_tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ add_executable(
2323
target_link_libraries(test_access_control PRIVATE ts::tscore OpenSSL::SSL OpenSSL::Crypto Catch2::Catch2WithMain)
2424
target_compile_definitions(test_access_control PRIVATE ACCESS_CONTROL_UNIT_TEST)
2525

26-
add_catch2_test(NAME test_access_control COMMAND test_access_control)
26+
add_catch2_test(NAME test_access_control)

plugins/experimental/cookie_remap/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ if(BUILD_TESTING)
2828

2929
target_link_libraries(test_cookiejar PRIVATE Catch2::Catch2WithMain)
3030

31-
add_catch2_test(NAME test_cookiejar COMMAND test_cookiejar)
31+
add_catch2_test(NAME test_cookiejar)
3232
endif()

plugins/experimental/ja4_fingerprint/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ if(BUILD_TESTING)
2323
add_executable(test_ja4 test_ja4.cc ja4.cc tls_client_hello_summary.cc)
2424
target_link_libraries(test_ja4 PRIVATE Catch2::Catch2WithMain)
2525

26-
add_catch2_test(NAME test_ja4 COMMAND test_ja4)
26+
add_catch2_test(NAME test_ja4)
2727
endif()

plugins/experimental/stale_response/unit_tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ add_executable(test_stale_response test_DirectiveParser.cc test_BodyData.cc ${PR
2020
target_include_directories(test_stale_response PRIVATE "${PROJECT_SOURCE_DIR}")
2121
target_link_libraries(test_stale_response PRIVATE ts::tsutil libswoc::libswoc Catch2::Catch2WithMain)
2222

23-
add_catch2_test(NAME test_stale_response COMMAND test_stale_response)
23+
add_catch2_test(NAME test_stale_response)

plugins/experimental/txn_box/unit_tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ target_link_libraries(
2929
# After fighting with CMake over the include paths, it's just not worth it to be correct.
3030
# target_link_libraries should make this work but it doesn't. I can't figure out why.
3131
target_include_directories(test_txn_box PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../plugin/include)
32-
add_catch2_test(NAME test_txn_box COMMAND test_txn_box)
32+
add_catch2_test(NAME test_txn_box)

plugins/experimental/uri_signing/unit_tests/CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ target_link_libraries(
4646
ts::inknet
4747
ts::overridable_txn_vars
4848
)
49-
add_catch2_test(NAME uri_signing_test COMMAND uri_signing_test)
50-
set_tests_properties(
51-
uri_signing_test
52-
PROPERTIES ENVIRONMENT "LSAN_OPTIONS=suppressions=${CMAKE_CURRENT_SOURCE_DIR}/uri_signing_test_leak_suppression.txt"
49+
add_catch2_test(
50+
NAME uri_signing_test PROPERTIES ENVIRONMENT
51+
"LSAN_OPTIONS=suppressions=${CMAKE_CURRENT_SOURCE_DIR}/uri_signing_test_leak_suppression.txt"
5352
)

0 commit comments

Comments
 (0)