Skip to content

Commit fd023d9

Browse files
committed
overridable timeouts
1 parent ffccd88 commit fd023d9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/CMakeLists.txt

+7-1
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,18 @@ if(WIN32)
4545
file_tests.cpp
4646
socket_tests.cpp
4747
)
48+
else()
49+
# let more time for some tests
50+
set(async_auto_reset_event_tests_TIMEOUT 60)
4851
endif()
4952

5053
foreach(test ${tests})
5154
get_filename_component(test_name ${test} NAME_WE)
5255
add_executable(${test_name} ${test})
5356
target_link_libraries(${test_name} PRIVATE tests-main)
5457
string(REPLACE "_" " " test_prefix ${test_name})
55-
doctest_discover_tests(${test_name} TEST_PREFIX ${test_prefix}- PROPERTIES TIMEOUT 30)
58+
if (NOT DEFINED ${test_name}_TIMEOUT)
59+
set(${test_name}_TIMEOUT 30)
60+
endif()
61+
doctest_discover_tests(${test_name} TEST_PREFIX ${test_prefix}- PROPERTIES TIMEOUT ${${test_name}_TIMEOUT})
5662
endforeach()

0 commit comments

Comments
 (0)