From 4e0b5f9b6d38bd6e3bf321499b4fa5da6453ebd9 Mon Sep 17 00:00:00 2001 From: Parth Aggarwal Date: Mon, 2 Mar 2026 14:59:45 -0800 Subject: [PATCH 1/2] Convert all tests to use TIMED_TEST_SUITE_INITIALIZE/CLEANUP Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- samples/async_op_samples_int/async_op_samples_int.c | 7 ++++--- tests/async_op_int/async_op_int.c | 7 ++++--- tests/async_op_ut/async_op_ut.c | 4 ++-- tests/async_op_ut/async_op_ut_pch.h | 4 +++- tests/async_retry_wrapper_ut/async_retry_wrapper_ut.c | 4 ++-- tests/async_retry_wrapper_ut/async_retry_wrapper_ut_pch.h | 4 +++- .../async_type_helper_copy_value_handler_ut.c | 6 +++--- .../async_type_helper_copy_value_handler_ut_pch.h | 4 +++- .../async_type_helper_ref_counted_handler_ut.c | 4 ++-- .../async_type_helper_ref_counted_handler_ut_pch.h | 4 +++- .../async_type_helper_thandle_handler_ut.c | 4 ++-- .../async_type_helper_thandle_handler_ut_pch.h | 4 +++- tests/async_type_helper_ut/async_type_helper_ut.c | 6 +++--- tests/async_type_helper_ut/async_type_helper_ut_pch.h | 4 +++- tests/azure_base64_ut/azure_base64_ut.c | 4 ++-- tests/azure_base64_ut/azure_base64_ut_pch.h | 4 +++- tests/buffer_ut/buffer_ut.c | 4 ++-- tests/buffer_ut/buffer_ut_pch.h | 4 +++- tests/cancellation_token_ut/cancellation_token_ut.c | 4 ++-- tests/cancellation_token_ut/cancellation_token_ut_pch.h | 4 +++- tests/channel_int/channel_int.c | 7 ++++--- tests/channel_ut/channel_ut.c | 4 ++-- tests/channel_ut/channel_ut_pch.h | 4 +++- .../constbuffer_array_batcher_nv_ut.c | 4 ++-- .../constbuffer_array_batcher_nv_ut_pch.h | 4 +++- tests/constbuffer_array_int/constbuffer_array_int.c | 7 ++++--- .../constbuffer_array_splitter_ut.c | 4 ++-- .../constbuffer_array_splitter_ut_pch.h | 4 +++- tests/constbuffer_array_ut/constbuffer_array_ut.c | 4 ++-- tests/constbuffer_array_ut/constbuffer_array_ut_pch.h | 4 +++- tests/constbuffer_thandle_int/constbuffer_thandle_int.c | 7 ++++--- tests/constbuffer_thandle_ut/constbuffer_thandle_ut.c | 4 ++-- tests/constbuffer_thandle_ut/constbuffer_thandle_ut_pch.h | 4 +++- tests/constbuffer_ut/constbuffer_ut.c | 4 ++-- tests/constbuffer_ut/constbuffer_ut_pch.h | 4 +++- tests/critical_section_ut/critical_section_ut.c | 6 +++--- tests/critical_section_ut/critical_section_ut_pch.h | 4 +++- tests/doublylinkedlist_ut/doublylinkedlist_ut.c | 4 ++-- tests/doublylinkedlist_ut/doublylinkedlist_ut_pch.h | 3 ++- .../external_command_helper_int.c | 7 ++++--- .../external_command_helper_ut.c | 6 +++--- .../external_command_helper_ut_pch.h | 4 +++- tests/filename_helper_ut/filename_helper_ut.c | 4 ++-- tests/filename_helper_ut/filename_helper_ut_pch.h | 4 +++- tests/flags_to_string_int/flags_to_string_int.c | 6 +++--- tests/flags_to_string_ut/flags_to_string_ut.c | 6 +++--- tests/flags_to_string_ut/flags_to_string_ut_pch.h | 4 +++- tests/for_each_in_folder_ut/for_each_in_folder_ut.c | 4 ++-- tests/for_each_in_folder_ut/for_each_in_folder_ut_pch.h | 4 +++- .../for_each_in_sub_folder_ut/for_each_in_sub_folder_ut.c | 4 ++-- .../for_each_in_sub_folder_ut_pch.h | 4 +++- tests/hash_ut/hash_ut.c | 6 +++--- tests/hash_ut/hash_ut_pch.h | 3 ++- tests/map_ut/map_ut.c | 4 ++-- tests/map_ut/map_ut_pch.h | 4 +++- tests/memory_data_ut/memory_data_ut.c | 4 ++-- tests/memory_data_ut/memory_data_ut_pch.h | 3 ++- .../object_lifetime_tracker_ut.c | 4 ++-- .../object_lifetime_tracker_ut_pch.h | 4 +++- tests/paged_sparse_array_int/paged_sparse_array_int.c | 7 ++++--- tests/paged_sparse_array_ut/paged_sparse_array_ut.c | 4 ++-- tests/paged_sparse_array_ut/paged_sparse_array_ut_pch.h | 4 +++- tests/rc_ptr_ut/rc_ptr_ut.c | 4 ++-- tests/rc_ptr_ut/rc_ptr_ut_pch.h | 4 +++- tests/rc_string_array_ut/rc_string_array_ut.c | 6 +++--- tests/rc_string_array_ut/rc_string_array_ut_pch.h | 4 +++- tests/rc_string_ut/rc_string_ut.c | 4 ++-- tests/rc_string_ut/rc_string_ut_pch.h | 4 +++- tests/rc_string_utils_ut/rc_string_utils_ut.c | 6 +++--- tests/rc_string_utils_ut/rc_string_utils_ut_pch.h | 4 +++- tests/reals_ut/c_util_reals_ut_pch.h | 3 ++- tests/singlylinkedlist_ut/singlylinkedlist_ut.c | 4 ++-- tests/singlylinkedlist_ut/singlylinkedlist_ut_pch.h | 4 +++- .../sliding_window_average_by_count_ut.c | 4 ++-- .../sliding_window_average_by_count_ut_pch.h | 4 +++- tests/strings_ut/strings_ut.c | 4 ++-- tests/strings_ut/strings_ut_pch.h | 4 +++- tests/sync_wrapper_ut/sync_wrapper_ut.c | 4 ++-- tests/sync_wrapper_ut/sync_wrapper_ut_pch.h | 4 +++- tests/tarray_2_int/tarray_2_int.c | 6 +++--- tests/tarray_int/tarray_int.c | 6 +++--- tests/tarray_ut/tarray_ut.c | 4 ++-- tests/tarray_ut/tarray_ut_pch.h | 4 +++- tests/tcall_dispatcher_int/tcall_dispatcher_int.c | 7 ++++--- tests/tcall_dispatcher_ut/tcall_dispatcher_ut.c | 4 ++-- tests/tcall_dispatcher_ut/tcall_dispatcher_ut_pch.h | 4 +++- tests/thandle_tuple_array_ut/thandle_tuple_array_ut.c | 6 +++--- tests/thandle_tuple_array_ut/thandle_tuple_array_ut_pch.h | 4 +++- .../thread_notifications_dispatcher_int.c | 7 ++++--- .../thread_notifications_dispatcher_ut.c | 6 +++--- .../thread_notifications_dispatcher_ut_pch.h | 4 +++- .../thread_notifications_dispatcher_wo_init_ut.c | 6 +++--- .../thread_notifications_dispatcher_wo_init_ut_pch.h | 4 +++- tests/tp_worker_thread_int/tp_worker_thread_int.c | 7 ++++--- tests/tp_worker_thread_ut/tp_worker_thread_ut.c | 6 +++--- tests/tp_worker_thread_ut/tp_worker_thread_ut_pch.h | 4 +++- tests/two_d_array_int/two_d_array_int.c | 7 ++++--- tests/two_d_array_ut/two_d_array_ut.c | 6 +++--- tests/two_d_array_ut/two_d_array_ut_pch.h | 4 +++- tests/uuid_string_ut/uuid_string_ut.c | 4 ++-- tests/uuid_string_ut/uuid_string_ut_pch.h | 4 +++- tests/watchdog_int/watchdog_int.c | 7 ++++--- tests/watchdog_threadpool_ut/watchdog_threadpool_ut.c | 6 +++--- tests/watchdog_threadpool_ut/watchdog_threadpool_ut_pch.h | 4 +++- tests/watchdog_ut/watchdog_ut.c | 4 ++-- tests/watchdog_ut/watchdog_ut_pch.h | 4 +++- tests/worker_thread_int/worker_thread_int.c | 7 ++++--- tests/worker_thread_ut/worker_thread_ut.c | 4 ++-- tests/worker_thread_ut/worker_thread_ut_pch.h | 4 +++- .../thread_notif_lackey_dll_wo_init_ut.c | 4 ++-- .../thread_notif_lackey_dll_wo_init_ut_pch.h | 4 +++- .../thread_notifications_lackey_dll_int.c | 7 ++++--- .../thread_notifications_lackey_dll_ut.c | 4 ++-- .../thread_notifications_lackey_dll_ut_pch.h | 4 +++- 114 files changed, 318 insertions(+), 210 deletions(-) diff --git a/samples/async_op_samples_int/async_op_samples_int.c b/samples/async_op_samples_int/async_op_samples_int.c index 72ef93e6..62559e14 100644 --- a/samples/async_op_samples_int/async_op_samples_int.c +++ b/samples/async_op_samples_int/async_op_samples_int.c @@ -16,6 +16,7 @@ #include "c_pal/sync.h" #include "c_pal/thandle.h" #include "c_pal/threadapi.h" +#include "c_pal/timed_test_suite.h" #include "c_util/async_op.h" @@ -366,12 +367,12 @@ static void test_ASYNC_OP_MODULE_CALLBACK(void* context, COMMON_ASYNC_OP_MODULE_ BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(TestClassInit) +TIMED_TEST_SUITE_INITIALIZE(TestClassInit, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, gballoc_hl_init(NULL, NULL)); } -TEST_SUITE_CLEANUP(TestClassCleanup) +TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { gballoc_hl_deinit(); } @@ -1444,4 +1445,4 @@ TEST_FUNCTION(all_modules_can_be_canceled_successfully_with_real_cancel_after_ma } } -END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) +END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) \ No newline at end of file diff --git a/tests/async_op_int/async_op_int.c b/tests/async_op_int/async_op_int.c index 6c30ad86..a6e7f4b9 100644 --- a/tests/async_op_int/async_op_int.c +++ b/tests/async_op_int/async_op_int.c @@ -15,6 +15,7 @@ #include "c_pal/gballoc_hl_redirect.h" #include "c_pal/thandle.h" +#include "c_pal/timed_test_suite.h" #include "c_util/async_op.h" @@ -84,12 +85,12 @@ static ASYNC_OP_DISPOSE disposes[] = BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(setsBufferTempSize) +TIMED_TEST_SUITE_INITIALIZE(setsBufferTempSize, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, gballoc_hl_init(NULL, NULL)); } -TEST_SUITE_CLEANUP(TestClassCleanup) +TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { gballoc_hl_deinit(); } @@ -144,4 +145,4 @@ TEST_FUNCTION(async_op_from_context_with_alignment_1) } } -END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) +END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) \ No newline at end of file diff --git a/tests/async_op_ut/async_op_ut.c b/tests/async_op_ut/async_op_ut.c index 4b486e34..c0817431 100644 --- a/tests/async_op_ut/async_op_ut.c +++ b/tests/async_op_ut/async_op_ut.c @@ -22,7 +22,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(setsBufferTempSize) +TIMED_TEST_SUITE_INITIALIZE(setsBufferTempSize, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -33,7 +33,7 @@ TEST_SUITE_INITIALIZE(setsBufferTempSize) REGISTER_GLOBAL_MOCK_FAIL_RETURN(realloc, NULL); } -TEST_SUITE_CLEANUP(TestClassCleanup) +TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); diff --git a/tests/async_op_ut/async_op_ut_pch.h b/tests/async_op_ut/async_op_ut_pch.h index e1544d70..998b8733 100644 --- a/tests/async_op_ut/async_op_ut_pch.h +++ b/tests/async_op_ut/async_op_ut_pch.h @@ -13,6 +13,8 @@ #include "testrunnerswitcher.h" #include "umock_c/umock_c.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" @@ -26,4 +28,4 @@ #include "c_util/async_op.h" -#endif // ASYNC_OP_UT_PCH_H +#endif // ASYNC_OP_UT_PCH_H \ No newline at end of file diff --git a/tests/async_retry_wrapper_ut/async_retry_wrapper_ut.c b/tests/async_retry_wrapper_ut/async_retry_wrapper_ut.c index 30a569b9..58728952 100644 --- a/tests/async_retry_wrapper_ut/async_retry_wrapper_ut.c +++ b/tests/async_retry_wrapper_ut/async_retry_wrapper_ut.c @@ -205,7 +205,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -258,7 +258,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_TYPE(TEST_ASYNC_API_SYNC_MULTIPLE_RESULT, TEST_ASYNC_API_SYNC_MULTIPLE_RESULT); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { THANDLE_ASSIGN(REAL_THREADPOOL)(&g.test_threadpool, NULL); umock_c_deinit(); diff --git a/tests/async_retry_wrapper_ut/async_retry_wrapper_ut_pch.h b/tests/async_retry_wrapper_ut/async_retry_wrapper_ut_pch.h index be1c02d9..d0b455ea 100644 --- a/tests/async_retry_wrapper_ut/async_retry_wrapper_ut_pch.h +++ b/tests/async_retry_wrapper_ut/async_retry_wrapper_ut_pch.h @@ -19,6 +19,8 @@ #include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to interlocked.h - at the moment verified through int tests - this is porting legacy code, temporary solution*/ +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #define GBALLOC_HL_REDIRECT_H #undef GBALLOC_HL_REDIRECT_H @@ -46,4 +48,4 @@ #include "c_util/async_retry_wrapper.h" -#endif // ASYNC_RETRY_WRAPPER_UT_PCH_H +#endif // ASYNC_RETRY_WRAPPER_UT_PCH_H \ No newline at end of file diff --git a/tests/async_type_helper_copy_value_handler_ut/async_type_helper_copy_value_handler_ut.c b/tests/async_type_helper_copy_value_handler_ut/async_type_helper_copy_value_handler_ut.c index 202bd1c5..44cf9be4 100644 --- a/tests/async_type_helper_copy_value_handler_ut/async_type_helper_copy_value_handler_ut.c +++ b/tests/async_type_helper_copy_value_handler_ut/async_type_helper_copy_value_handler_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. @@ -27,7 +27,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -38,7 +38,7 @@ TEST_SUITE_INITIALIZE(suite_init) } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/async_type_helper_copy_value_handler_ut/async_type_helper_copy_value_handler_ut_pch.h b/tests/async_type_helper_copy_value_handler_ut/async_type_helper_copy_value_handler_ut_pch.h index 85dfdf5a..cf6d4ca2 100644 --- a/tests/async_type_helper_copy_value_handler_ut/async_type_helper_copy_value_handler_ut_pch.h +++ b/tests/async_type_helper_copy_value_handler_ut/async_type_helper_copy_value_handler_ut_pch.h @@ -17,6 +17,8 @@ #include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to this interlocked.h, temporary solution*/ +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -28,4 +30,4 @@ #include "c_util/async_type_helper_copy_value_handler.h" -#endif // ASYNC_TYPE_HELPER_COPY_VALUE_HANDLER_UT_PCH_H +#endif // ASYNC_TYPE_HELPER_COPY_VALUE_HANDLER_UT_PCH_H \ No newline at end of file diff --git a/tests/async_type_helper_ref_counted_handler_ut/async_type_helper_ref_counted_handler_ut.c b/tests/async_type_helper_ref_counted_handler_ut/async_type_helper_ref_counted_handler_ut.c index 0b086f4f..3c62c0d1 100644 --- a/tests/async_type_helper_ref_counted_handler_ut/async_type_helper_ref_counted_handler_ut.c +++ b/tests/async_type_helper_ref_counted_handler_ut/async_type_helper_ref_counted_handler_ut.c @@ -21,7 +21,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -38,7 +38,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_ALIAS_TYPE(TEST_REFCOUNTED_HANDLE, void*); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/async_type_helper_ref_counted_handler_ut/async_type_helper_ref_counted_handler_ut_pch.h b/tests/async_type_helper_ref_counted_handler_ut/async_type_helper_ref_counted_handler_ut_pch.h index e642862e..12821216 100644 --- a/tests/async_type_helper_ref_counted_handler_ut/async_type_helper_ref_counted_handler_ut_pch.h +++ b/tests/async_type_helper_ref_counted_handler_ut/async_type_helper_ref_counted_handler_ut_pch.h @@ -17,6 +17,8 @@ #include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to this interlocked.h, temporary solution*/ +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -29,4 +31,4 @@ #include "c_util/async_type_helper_ref_counted_handler.h" -#endif // ASYNC_TYPE_HELPER_REF_COUNTED_HANDLER_UT_PCH_H +#endif // ASYNC_TYPE_HELPER_REF_COUNTED_HANDLER_UT_PCH_H \ No newline at end of file diff --git a/tests/async_type_helper_thandle_handler_ut/async_type_helper_thandle_handler_ut.c b/tests/async_type_helper_thandle_handler_ut/async_type_helper_thandle_handler_ut.c index de787392..15232345 100644 --- a/tests/async_type_helper_thandle_handler_ut/async_type_helper_thandle_handler_ut.c +++ b/tests/async_type_helper_thandle_handler_ut/async_type_helper_thandle_handler_ut.c @@ -27,7 +27,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -43,7 +43,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_ALIAS_TYPE(THANDLE(TEST_THANDLE), void*); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/async_type_helper_thandle_handler_ut/async_type_helper_thandle_handler_ut_pch.h b/tests/async_type_helper_thandle_handler_ut/async_type_helper_thandle_handler_ut_pch.h index 3e88e1dc..50d922e2 100644 --- a/tests/async_type_helper_thandle_handler_ut/async_type_helper_thandle_handler_ut_pch.h +++ b/tests/async_type_helper_thandle_handler_ut/async_type_helper_thandle_handler_ut_pch.h @@ -17,6 +17,8 @@ #include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to this interlocked.h, temporary solution*/ +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -32,4 +34,4 @@ // This is a hack. If test_thandle would be simply at global scope they'd be const and noone could write to them in the test functions -#endif // ASYNC_TYPE_HELPER_THANDLE_HANDLER_UT_PCH_H +#endif // ASYNC_TYPE_HELPER_THANDLE_HANDLER_UT_PCH_H \ No newline at end of file diff --git a/tests/async_type_helper_ut/async_type_helper_ut.c b/tests/async_type_helper_ut/async_type_helper_ut.c index 1207f620..8e95d7d0 100644 --- a/tests/async_type_helper_ut/async_type_helper_ut.c +++ b/tests/async_type_helper_ut/async_type_helper_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. #include "async_type_helper_ut_pch.h" @@ -18,7 +18,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -44,7 +44,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_ALIAS_TYPE(constbuffer_array_ptr, CONSTBUFFER_ARRAY_HANDLE*); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/async_type_helper_ut/async_type_helper_ut_pch.h b/tests/async_type_helper_ut/async_type_helper_ut_pch.h index 31ff59be..72b64462 100644 --- a/tests/async_type_helper_ut/async_type_helper_ut_pch.h +++ b/tests/async_type_helper_ut/async_type_helper_ut_pch.h @@ -19,6 +19,8 @@ #include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to interlocked.h - at the moment verified through int tests - this is porting legacy code, temporary solution*/ +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -34,4 +36,4 @@ #define TEST_PAYLOAD_SIZE 128 -#endif // ASYNC_TYPE_HELPER_UT_PCH_H +#endif // ASYNC_TYPE_HELPER_UT_PCH_H \ No newline at end of file diff --git a/tests/azure_base64_ut/azure_base64_ut.c b/tests/azure_base64_ut/azure_base64_ut.c index d7ac1806..6747032c 100644 --- a/tests/azure_base64_ut/azure_base64_ut.c +++ b/tests/azure_base64_ut/azure_base64_ut.c @@ -1444,7 +1444,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(TestSuiteInitialize) +TIMED_TEST_SUITE_INITIALIZE(TestSuiteInitialize, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -1453,7 +1453,7 @@ TEST_SUITE_INITIALIZE(TestSuiteInitialize) REGISTER_GBALLOC_HL_GLOBAL_MOCK_HOOK(); } -TEST_SUITE_CLEANUP(TestClassCleanup) +TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); diff --git a/tests/azure_base64_ut/azure_base64_ut_pch.h b/tests/azure_base64_ut/azure_base64_ut_pch.h index 3ca6b052..5c927380 100644 --- a/tests/azure_base64_ut/azure_base64_ut_pch.h +++ b/tests/azure_base64_ut/azure_base64_ut_pch.h @@ -15,6 +15,8 @@ #include "umock_c/umock_c.h" #include "umock_c/umock_c_negative_tests.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -27,4 +29,4 @@ #include "c_util/azure_base64.h" -#endif // AZURE_BASE64_UT_PCH_H +#endif // AZURE_BASE64_UT_PCH_H \ No newline at end of file diff --git a/tests/buffer_ut/buffer_ut.c b/tests/buffer_ut/buffer_ut.c index 4893df8a..5adc0fc1 100644 --- a/tests/buffer_ut/buffer_ut.c +++ b/tests/buffer_ut/buffer_ut.c @@ -31,7 +31,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) - TEST_SUITE_INITIALIZE(setsBufferTempSize) + TIMED_TEST_SUITE_INITIALIZE(setsBufferTempSize, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -44,7 +44,7 @@ BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) REGISTER_GLOBAL_MOCK_FAIL_RETURN(realloc, NULL); } - TEST_SUITE_CLEANUP(TestClassCleanup) + TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); diff --git a/tests/buffer_ut/buffer_ut_pch.h b/tests/buffer_ut/buffer_ut_pch.h index cf352d7f..fb812ccc 100644 --- a/tests/buffer_ut/buffer_ut_pch.h +++ b/tests/buffer_ut/buffer_ut_pch.h @@ -17,6 +17,8 @@ #include "real_gballoc_ll.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -26,4 +28,4 @@ #include "c_util/buffer_.h" -#endif // BUFFER_UT_PCH_H +#endif // BUFFER_UT_PCH_H \ No newline at end of file diff --git a/tests/cancellation_token_ut/cancellation_token_ut.c b/tests/cancellation_token_ut/cancellation_token_ut.c index f41bb5e0..6e0cc6b3 100644 --- a/tests/cancellation_token_ut/cancellation_token_ut.c +++ b/tests/cancellation_token_ut/cancellation_token_ut.c @@ -20,7 +20,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -40,7 +40,7 @@ TEST_SUITE_INITIALIZE(suite_init) ASSERT_ARE_EQUAL(int, 0, umock_c_negative_tests_init()); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_negative_tests_deinit(); umock_c_deinit(); diff --git a/tests/cancellation_token_ut/cancellation_token_ut_pch.h b/tests/cancellation_token_ut/cancellation_token_ut_pch.h index 4cd118c1..bea446fb 100644 --- a/tests/cancellation_token_ut/cancellation_token_ut_pch.h +++ b/tests/cancellation_token_ut/cancellation_token_ut_pch.h @@ -18,6 +18,8 @@ #include "umock_c/umocktypes_bool.h" #include "umock_c/umocktypes_stdint.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -31,4 +33,4 @@ #include "c_util/cancellation_token.h" -#endif // CANCELLATION_TOKEN_UT_PCH_H +#endif // CANCELLATION_TOKEN_UT_PCH_H \ No newline at end of file diff --git a/tests/channel_int/channel_int.c b/tests/channel_int/channel_int.c index 325b77bc..7b4284fd 100644 --- a/tests/channel_int/channel_int.c +++ b/tests/channel_int/channel_int.c @@ -18,6 +18,7 @@ #include "c_pal/threadapi.h" #include "c_pal/sync.h" #include "c_pal/srw_lock.h" +#include "c_pal/timed_test_suite.h" #include "c_util/rc_ptr.h" #include "c_util/channel.h" @@ -350,7 +351,7 @@ static int push_data(void* context) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { void* execution_engine_parameters = NULL; @@ -374,7 +375,7 @@ TEST_SUITE_INITIALIZE(suite_init) ASSERT_IS_NOT_NULL(g.g_push_correlation_id); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { THANDLE_ASSIGN(RC_STRING)(&g.g_push_correlation_id, NULL); THANDLE_ASSIGN(RC_STRING)(&g.g_pull_correlation_id, NULL); @@ -1081,4 +1082,4 @@ TEST_FUNCTION(channel_close_does_not_deadlock_if_called_from_pull_callback) THANDLE_ASSIGN(CHANNEL)(&channel, NULL); } -END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) +END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) \ No newline at end of file diff --git a/tests/channel_ut/channel_ut.c b/tests/channel_ut/channel_ut.c index 8eb0f4b3..fff818b7 100644 --- a/tests/channel_ut/channel_ut.c +++ b/tests/channel_ut/channel_ut.c @@ -272,7 +272,7 @@ static int hook_threadpool_schedule_work_do_nothing(THANDLE(THREADPOOL) threadpo } BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, umock_c_init(on_umock_c_error), "umock_c_init failed"); ASSERT_ARE_EQUAL(int, 0, umocktypes_bool_register_types(), "umocktypes_bool_register_types"); @@ -349,7 +349,7 @@ TEST_SUITE_INITIALIZE(suite_init) } } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { THANDLE_ASSIGN(REAL_THREADPOOL)(&g.g_threadpool, NULL); THANDLE_ASSIGN(real_RC_STRING)((THANDLE(RC_STRING)*) & g.g_push_correlation_id, NULL); diff --git a/tests/channel_ut/channel_ut_pch.h b/tests/channel_ut/channel_ut_pch.h index 7bb31552..beb26ec3 100644 --- a/tests/channel_ut/channel_ut_pch.h +++ b/tests/channel_ut/channel_ut_pch.h @@ -22,6 +22,8 @@ #include "c_pal/execution_engine.h" #include "c_pal/interlocked.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -56,4 +58,4 @@ #define DISABLE_TEST_FUNCTION(x) static void x(void) -#endif // CHANNEL_UT_PCH_H +#endif // CHANNEL_UT_PCH_H \ No newline at end of file diff --git a/tests/constbuffer_array_batcher_nv_ut/constbuffer_array_batcher_nv_ut.c b/tests/constbuffer_array_batcher_nv_ut/constbuffer_array_batcher_nv_ut.c index 8ad82175..53feb205 100644 --- a/tests/constbuffer_array_batcher_nv_ut/constbuffer_array_batcher_nv_ut.c +++ b/tests/constbuffer_array_batcher_nv_ut/constbuffer_array_batcher_nv_ut.c @@ -13,7 +13,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { int result; @@ -41,7 +41,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_ALIAS_TYPE(CONSTBUFFER_ARRAY_HANDLE, void*); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/constbuffer_array_batcher_nv_ut/constbuffer_array_batcher_nv_ut_pch.h b/tests/constbuffer_array_batcher_nv_ut/constbuffer_array_batcher_nv_ut_pch.h index 819b75a4..93e1569d 100644 --- a/tests/constbuffer_array_batcher_nv_ut/constbuffer_array_batcher_nv_ut_pch.h +++ b/tests/constbuffer_array_batcher_nv_ut/constbuffer_array_batcher_nv_ut_pch.h @@ -17,6 +17,8 @@ #include "umock_c/umocktypes_stdint.h" #include "umock_c/umock_c_negative_tests.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_util/constbuffer.h" @@ -34,4 +36,4 @@ #include "../reals/real_constbuffer_array.h" #include "../reals/real_memory_data.h" -#endif // CONSTBUFFER_ARRAY_BATCHER_NV_UT_PCH_H +#endif // CONSTBUFFER_ARRAY_BATCHER_NV_UT_PCH_H \ No newline at end of file diff --git a/tests/constbuffer_array_int/constbuffer_array_int.c b/tests/constbuffer_array_int/constbuffer_array_int.c index a0327787..4066812d 100644 --- a/tests/constbuffer_array_int/constbuffer_array_int.c +++ b/tests/constbuffer_array_int/constbuffer_array_int.c @@ -12,18 +12,19 @@ #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" +#include "c_pal/timed_test_suite.h" #include "c_util/constbuffer.h" #include "c_util/constbuffer_array.h" BEGIN_TEST_SUITE(constbuffer_array_int) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, gballoc_hl_init(NULL, NULL)); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { gballoc_hl_deinit(); } @@ -332,4 +333,4 @@ TEST_FUNCTION(constbuffer_array_remove_empty_buffers_with_no_empty_buffers_retur constbuffer_array_dec_ref(filtered_array); } -END_TEST_SUITE(constbuffer_array_int) +END_TEST_SUITE(constbuffer_array_int) \ No newline at end of file diff --git a/tests/constbuffer_array_splitter_ut/constbuffer_array_splitter_ut.c b/tests/constbuffer_array_splitter_ut/constbuffer_array_splitter_ut.c index 2f1968d7..c498c6e0 100644 --- a/tests/constbuffer_array_splitter_ut/constbuffer_array_splitter_ut.c +++ b/tests/constbuffer_array_splitter_ut/constbuffer_array_splitter_ut.c @@ -68,7 +68,7 @@ static CONSTBUFFER_ARRAY_HANDLE generate_test_buffer_array(uint32_t buffer_count BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -101,7 +101,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_ALIAS_TYPE(TARRAY(CONSTBUFFER_ARRAY_HANDLE), void*); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/constbuffer_array_splitter_ut/constbuffer_array_splitter_ut_pch.h b/tests/constbuffer_array_splitter_ut/constbuffer_array_splitter_ut_pch.h index 5def8c45..29670a98 100644 --- a/tests/constbuffer_array_splitter_ut/constbuffer_array_splitter_ut_pch.h +++ b/tests/constbuffer_array_splitter_ut/constbuffer_array_splitter_ut_pch.h @@ -18,6 +18,8 @@ #include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to interlocked.h - at the moment verified through int tests - this is porting legacy code, temporary solution*/ +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -35,4 +37,4 @@ #include "c_util/constbuffer_array_splitter.h" -#endif // CONSTBUFFER_ARRAY_SPLITTER_UT_PCH_H +#endif // CONSTBUFFER_ARRAY_SPLITTER_UT_PCH_H \ No newline at end of file diff --git a/tests/constbuffer_array_ut/constbuffer_array_ut.c b/tests/constbuffer_array_ut/constbuffer_array_ut.c index 3557de3f..b61b776b 100644 --- a/tests/constbuffer_array_ut/constbuffer_array_ut.c +++ b/tests/constbuffer_array_ut/constbuffer_array_ut.c @@ -262,7 +262,7 @@ static void validate_sorted_constbuffer_array(CONSTBUFFER_ARRAY_HANDLE constbuff BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { int result; @@ -292,7 +292,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_INTERLOCKED_GLOBAL_MOCK_HOOK(); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/constbuffer_array_ut/constbuffer_array_ut_pch.h b/tests/constbuffer_array_ut/constbuffer_array_ut_pch.h index 60a17b7d..8c39eeca 100644 --- a/tests/constbuffer_array_ut/constbuffer_array_ut_pch.h +++ b/tests/constbuffer_array_ut/constbuffer_array_ut_pch.h @@ -19,6 +19,8 @@ #include "umock_c/umocktypes_bool.h" #include "umock_c/umock_c_negative_tests.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -32,4 +34,4 @@ #include "c_util/constbuffer_array.h" -#endif // CONSTBUFFER_ARRAY_UT_PCH_H +#endif // CONSTBUFFER_ARRAY_UT_PCH_H \ No newline at end of file diff --git a/tests/constbuffer_thandle_int/constbuffer_thandle_int.c b/tests/constbuffer_thandle_int/constbuffer_thandle_int.c index d3581a9d..335832a1 100644 --- a/tests/constbuffer_thandle_int/constbuffer_thandle_int.c +++ b/tests/constbuffer_thandle_int/constbuffer_thandle_int.c @@ -13,18 +13,19 @@ #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" #include "c_pal/thandle.h" +#include "c_pal/timed_test_suite.h" #include "c_util/constbuffer_thandle.h" BEGIN_TEST_SUITE(constbuffer_thandle_int) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { int result = gballoc_hl_init(NULL, NULL); ASSERT_ARE_EQUAL(int, 0, result); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { gballoc_hl_deinit(); } @@ -415,4 +416,4 @@ TEST_FUNCTION(CONSTBUFFER_THANDLE_to_buffer_serializes_correctly) THANDLE_ASSIGN(CONSTBUFFER)(&handle, NULL); } -END_TEST_SUITE(constbuffer_thandle_int) +END_TEST_SUITE(constbuffer_thandle_int) \ No newline at end of file diff --git a/tests/constbuffer_thandle_ut/constbuffer_thandle_ut.c b/tests/constbuffer_thandle_ut/constbuffer_thandle_ut.c index be48fe12..9c7ff0c1 100644 --- a/tests/constbuffer_thandle_ut/constbuffer_thandle_ut.c +++ b/tests/constbuffer_thandle_ut/constbuffer_thandle_ut.c @@ -62,7 +62,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(constbuffer_thandle_ut) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { int result = real_gballoc_hl_init(NULL, NULL); ASSERT_ARE_EQUAL(int, 0, result); @@ -85,7 +85,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_GLOBAL_MOCK_HOOK(BUFFER_length, my_BUFFER_length); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); real_gballoc_hl_deinit(); diff --git a/tests/constbuffer_thandle_ut/constbuffer_thandle_ut_pch.h b/tests/constbuffer_thandle_ut/constbuffer_thandle_ut_pch.h index 77d5cd53..66c335a5 100644 --- a/tests/constbuffer_thandle_ut/constbuffer_thandle_ut_pch.h +++ b/tests/constbuffer_thandle_ut/constbuffer_thandle_ut_pch.h @@ -25,6 +25,8 @@ #include "umock_c/umocktypes_charptr.h" #include "umock_c/umock_c_negative_tests.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_util/buffer_.h" #include "c_pal/gballoc_hl.h" @@ -39,4 +41,4 @@ #include "c_util/memory_data.h" #include "c_util/constbuffer_thandle.h" -#endif // CONSTBUFFER_THANDLE_UT_PCH_H +#endif // CONSTBUFFER_THANDLE_UT_PCH_H \ No newline at end of file diff --git a/tests/constbuffer_ut/constbuffer_ut.c b/tests/constbuffer_ut/constbuffer_ut.c index 512dd4cf..2478942f 100644 --- a/tests/constbuffer_ut/constbuffer_ut.c +++ b/tests/constbuffer_ut/constbuffer_ut.c @@ -92,7 +92,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) - TEST_SUITE_INITIALIZE(setsBufferTempSize) + TIMED_TEST_SUITE_INITIALIZE(setsBufferTempSize, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -110,7 +110,7 @@ BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) REGISTER_GLOBAL_MOCK_HOOK(test_alloc, test_alloc_impl); } - TEST_SUITE_CLEANUP(TestClassCleanup) + TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); diff --git a/tests/constbuffer_ut/constbuffer_ut_pch.h b/tests/constbuffer_ut/constbuffer_ut_pch.h index b786dadc..469439f9 100644 --- a/tests/constbuffer_ut/constbuffer_ut_pch.h +++ b/tests/constbuffer_ut/constbuffer_ut_pch.h @@ -17,6 +17,8 @@ #include "macro_utils/macro_utils.h" #include "testrunnerswitcher.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_util/buffer_.h" #include "c_pal/gballoc_hl.h" @@ -28,4 +30,4 @@ #include "real_gballoc_hl.h" -#endif // CONSTBUFFER_UT_PCH_H +#endif // CONSTBUFFER_UT_PCH_H \ No newline at end of file diff --git a/tests/critical_section_ut/critical_section_ut.c b/tests/critical_section_ut/critical_section_ut.c index 91061c70..e2633751 100644 --- a/tests/critical_section_ut/critical_section_ut.c +++ b/tests/critical_section_ut/critical_section_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "critical_section_ut_pch.h" @@ -14,13 +14,13 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) - TEST_SUITE_INITIALIZE(test_suite_intialize) + TIMED_TEST_SUITE_INITIALIZE(test_suite_intialize, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, umock_c_init(on_umock_c_error), "umock_c_init failed"); ASSERT_ARE_EQUAL(int, 0, umocktypes_stdint_register_types(), "umocktypes_stdint_register_types failed"); } - TEST_SUITE_CLEANUP(test_class_cleanup) + TIMED_TEST_SUITE_CLEANUP(test_class_cleanup) { umock_c_deinit(); } diff --git a/tests/critical_section_ut/critical_section_ut_pch.h b/tests/critical_section_ut/critical_section_ut_pch.h index 87003176..a4a7c801 100644 --- a/tests/critical_section_ut/critical_section_ut_pch.h +++ b/tests/critical_section_ut/critical_section_ut_pch.h @@ -15,6 +15,8 @@ #include "umock_c/umocktypes.h" #include "umock_c/umocktypes_stdint.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/sync.h" @@ -28,4 +30,4 @@ #include "c_util/critical_section.h" -#endif // CRITICAL_SECTION_UT_PCH_H +#endif // CRITICAL_SECTION_UT_PCH_H \ No newline at end of file diff --git a/tests/doublylinkedlist_ut/doublylinkedlist_ut.c b/tests/doublylinkedlist_ut/doublylinkedlist_ut.c index fa8918ba..4193c0fa 100644 --- a/tests/doublylinkedlist_ut/doublylinkedlist_ut.c +++ b/tests/doublylinkedlist_ut/doublylinkedlist_ut.c @@ -57,7 +57,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(TestClassInitialize) +TIMED_TEST_SUITE_INITIALIZE(TestClassInitialize, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, umock_c_init(on_umock_c_error), "umock_c_init"); ASSERT_ARE_EQUAL(int, 0, umocktypes_charptr_register_types(), "umocktypes_charptr_register_types"); @@ -65,7 +65,7 @@ TEST_SUITE_INITIALIZE(TestClassInitialize) REGISTER_UMOCK_ALIAS_TYPE(PDLIST_ENTRY, void*); } -TEST_SUITE_CLEANUP(TestClassCleanup) +TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); } diff --git a/tests/doublylinkedlist_ut/doublylinkedlist_ut_pch.h b/tests/doublylinkedlist_ut/doublylinkedlist_ut_pch.h index 30465faa..0a887461 100644 --- a/tests/doublylinkedlist_ut/doublylinkedlist_ut_pch.h +++ b/tests/doublylinkedlist_ut/doublylinkedlist_ut_pch.h @@ -11,8 +11,9 @@ #include "umock_c/umocktypes_charptr.h" #include "c_pal/containing_record.h" +#include "c_pal/timed_test_suite.h" #include "c_util/doublylinkedlist.h" #include "testrunnerswitcher.h" -#endif // DOUBLYLINKEDLIST_UT_PCH_H +#endif // DOUBLYLINKEDLIST_UT_PCH_H \ No newline at end of file diff --git a/tests/external_command_helper_int/external_command_helper_int.c b/tests/external_command_helper_int/external_command_helper_int.c index 1c29b1c1..8df798e3 100644 --- a/tests/external_command_helper_int/external_command_helper_int.c +++ b/tests/external_command_helper_int/external_command_helper_int.c @@ -12,6 +12,7 @@ #include "macro_utils/macro_utils.h" #include "c_pal/gballoc_hl.h" +#include "c_pal/timed_test_suite.h" #include "c_logging/logger.h" #include "c_util/rc_string_array.h" @@ -38,12 +39,12 @@ TEST_DEFINE_ENUM_TYPE(EXTERNAL_COMMAND_RESULT, EXTERNAL_COMMAND_RESULT_VALUES); BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, gballoc_hl_init(NULL, NULL)); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { gballoc_hl_deinit(); } @@ -154,4 +155,4 @@ TEST_FUNCTION(external_command_helper_runs_with_3_lines_output_returns_1) rc_string_array_destroy(lines); } -END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) +END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) \ No newline at end of file diff --git a/tests/external_command_helper_ut/external_command_helper_ut.c b/tests/external_command_helper_ut/external_command_helper_ut.c index 984d6e77..a932e335 100644 --- a/tests/external_command_helper_ut/external_command_helper_ut.c +++ b/tests/external_command_helper_ut/external_command_helper_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "external_command_helper_ut_pch.h" @@ -105,7 +105,7 @@ static void expect_store_lines(uint32_t line_count) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -129,7 +129,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_ALIAS_TYPE(THANDLE(RC_STRING), void*); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/external_command_helper_ut/external_command_helper_ut_pch.h b/tests/external_command_helper_ut/external_command_helper_ut_pch.h index eda02d8b..8b6bb00d 100644 --- a/tests/external_command_helper_ut/external_command_helper_ut_pch.h +++ b/tests/external_command_helper_ut/external_command_helper_ut_pch.h @@ -22,6 +22,8 @@ #include "c_logging/logger.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -39,4 +41,4 @@ #include "c_util/external_command_helper.h" -#endif // EXTERNAL_COMMAND_HELPER_UT_PCH_H +#endif // EXTERNAL_COMMAND_HELPER_UT_PCH_H \ No newline at end of file diff --git a/tests/filename_helper_ut/filename_helper_ut.c b/tests/filename_helper_ut/filename_helper_ut.c index 26f0bf9a..0376aa2e 100644 --- a/tests/filename_helper_ut/filename_helper_ut.c +++ b/tests/filename_helper_ut/filename_helper_ut.c @@ -82,7 +82,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -97,7 +97,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_VALUE_TYPE(va_list, umockvalue_stringify_va_list, umockvalue_are_equal_va_list, umockvalue_copy_va_list, umockvalue_free_va_list); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/filename_helper_ut/filename_helper_ut_pch.h b/tests/filename_helper_ut/filename_helper_ut_pch.h index 7a7acad1..a1df8e82 100644 --- a/tests/filename_helper_ut/filename_helper_ut_pch.h +++ b/tests/filename_helper_ut/filename_helper_ut_pch.h @@ -19,6 +19,8 @@ #include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to interlocked.h - at the moment verified through int tests - this is porting legacy code, temporary solution*/ +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -30,4 +32,4 @@ #include "c_util/filename_helper.h" -#endif // FILENAME_HELPER_UT_PCH_H +#endif // FILENAME_HELPER_UT_PCH_H \ No newline at end of file diff --git a/tests/flags_to_string_int/flags_to_string_int.c b/tests/flags_to_string_int/flags_to_string_int.c index d5a3781d..0fd66efc 100644 --- a/tests/flags_to_string_int/flags_to_string_int.c +++ b/tests/flags_to_string_int/flags_to_string_int.c @@ -7,6 +7,7 @@ #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" +#include "c_pal/timed_test_suite.h" #include "c_util/flags_to_string.h" @@ -15,11 +16,11 @@ BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(it_does_something) +TIMED_TEST_SUITE_INITIALIZE(it_does_something, TIMED_TEST_DEFAULT_TIMEOUT_MS) { } -TEST_SUITE_CLEANUP(TestClassCleanup) +TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { } @@ -152,4 +153,3 @@ TEST_FUNCTION(collection_two_can_print_all_bits) } END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) - diff --git a/tests/flags_to_string_ut/flags_to_string_ut.c b/tests/flags_to_string_ut/flags_to_string_ut.c index 03cd94fb..b7613010 100644 --- a/tests/flags_to_string_ut/flags_to_string_ut.c +++ b/tests/flags_to_string_ut/flags_to_string_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "flags_to_string_ut_pch.h" @@ -51,7 +51,7 @@ static void umockvalue_free_va_list(void* value) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -68,7 +68,7 @@ TEST_SUITE_INITIALIZE(suite_init) } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/flags_to_string_ut/flags_to_string_ut_pch.h b/tests/flags_to_string_ut/flags_to_string_ut_pch.h index 28916836..688216f8 100644 --- a/tests/flags_to_string_ut/flags_to_string_ut_pch.h +++ b/tests/flags_to_string_ut/flags_to_string_ut_pch.h @@ -19,6 +19,8 @@ #include "umock_c/umocktypes_windows.h" #include "umock_c/umock_c_negative_tests.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/string_utils.h" #include "c_pal/gballoc_hl.h" @@ -30,4 +32,4 @@ #include "flags_to_string_helper.h" -#endif // FLAGS_TO_STRING_UT_PCH_H +#endif // FLAGS_TO_STRING_UT_PCH_H \ No newline at end of file diff --git a/tests/for_each_in_folder_ut/for_each_in_folder_ut.c b/tests/for_each_in_folder_ut/for_each_in_folder_ut.c index e164b27b..d0201b9b 100644 --- a/tests/for_each_in_folder_ut/for_each_in_folder_ut.c +++ b/tests/for_each_in_folder_ut/for_each_in_folder_ut.c @@ -74,7 +74,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -105,7 +105,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_GLOBAL_MOCK_RETURNS(mocked_GetLastError, ERROR_SUCCESS, ERROR_ACCESS_DENIED); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/for_each_in_folder_ut/for_each_in_folder_ut_pch.h b/tests/for_each_in_folder_ut/for_each_in_folder_ut_pch.h index 8857a629..7bc4f84d 100644 --- a/tests/for_each_in_folder_ut/for_each_in_folder_ut_pch.h +++ b/tests/for_each_in_folder_ut/for_each_in_folder_ut_pch.h @@ -21,6 +21,8 @@ #include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to interlocked.h - at the moment verified through int tests - this is porting legacy code, temporary solution*/ +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -36,4 +38,4 @@ #include "c_util/for_each_in_folder.h" -#endif // FOR_EACH_IN_FOLDER_UT_PCH_H +#endif // FOR_EACH_IN_FOLDER_UT_PCH_H \ No newline at end of file diff --git a/tests/for_each_in_sub_folder_ut/for_each_in_sub_folder_ut.c b/tests/for_each_in_sub_folder_ut/for_each_in_sub_folder_ut.c index 579a6eff..9f10a53f 100644 --- a/tests/for_each_in_sub_folder_ut/for_each_in_sub_folder_ut.c +++ b/tests/for_each_in_sub_folder_ut/for_each_in_sub_folder_ut.c @@ -237,7 +237,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -266,7 +266,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_ALIAS_TYPE(va_list, void*); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/for_each_in_sub_folder_ut/for_each_in_sub_folder_ut_pch.h b/tests/for_each_in_sub_folder_ut/for_each_in_sub_folder_ut_pch.h index 208b352e..49da099d 100644 --- a/tests/for_each_in_sub_folder_ut/for_each_in_sub_folder_ut_pch.h +++ b/tests/for_each_in_sub_folder_ut/for_each_in_sub_folder_ut_pch.h @@ -21,6 +21,8 @@ #include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to interlocked.h - at the moment verified through int tests - this is porting legacy code, temporary solution*/ +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -40,4 +42,4 @@ #define TEST_FOLDER_DEFINE "c:\\folder" -#endif // FOR_EACH_IN_SUB_FOLDER_UT_PCH_H +#endif // FOR_EACH_IN_SUB_FOLDER_UT_PCH_H \ No newline at end of file diff --git a/tests/hash_ut/hash_ut.c b/tests/hash_ut/hash_ut.c index 1c5aafb4..a3d9c515 100644 --- a/tests/hash_ut/hash_ut.c +++ b/tests/hash_ut/hash_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "hash_ut_pch.h" @@ -17,14 +17,14 @@ MOCK_FUNCTION_END(0x42) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, umock_c_init(on_umock_c_error), "umock_c_init"); ASSERT_ARE_EQUAL(int, 0, umocktypes_stdint_register_types(), "umocktypes_stdint_register_types"); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); } diff --git a/tests/hash_ut/hash_ut_pch.h b/tests/hash_ut/hash_ut_pch.h index 503c4072..6833325d 100644 --- a/tests/hash_ut/hash_ut_pch.h +++ b/tests/hash_ut/hash_ut_pch.h @@ -12,10 +12,11 @@ #include "macro_utils/macro_utils.h" #include "testrunnerswitcher.h" +#include "c_pal/timed_test_suite.h" #include "umock_c/umock_c.h" #include "umock_c/umocktypes_stdint.h" #include "umock_c/umocktypes.h" #include "c_util/hash.h" -#endif // HASH_UT_PCH_H +#endif // HASH_UT_PCH_H \ No newline at end of file diff --git a/tests/map_ut/map_ut.c b/tests/map_ut/map_ut.c index f9237662..a0bbb1e2 100644 --- a/tests/map_ut/map_ut.c +++ b/tests/map_ut/map_ut.c @@ -77,7 +77,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) - TEST_SUITE_INITIALIZE(TestClassInitialize) + TIMED_TEST_SUITE_INITIALIZE(TestClassInitialize, TIMED_TEST_DEFAULT_TIMEOUT_MS) { int result; @@ -97,7 +97,7 @@ BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) REGISTER_GLOBAL_MOCK_HOOK(STRING_new_JSON, my_STRING_new_JSON); } - TEST_SUITE_CLEANUP(TestClassCleanup) + TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); diff --git a/tests/map_ut/map_ut_pch.h b/tests/map_ut/map_ut_pch.h index 87672a91..440100e2 100644 --- a/tests/map_ut/map_ut_pch.h +++ b/tests/map_ut/map_ut_pch.h @@ -14,6 +14,8 @@ #include "umock_c/umock_c.h" #include "umock_c/umocktypes_charptr.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_util/strings.h" @@ -27,4 +29,4 @@ #include "c_util/map.h" -#endif // MAP_UT_PCH_H +#endif // MAP_UT_PCH_H \ No newline at end of file diff --git a/tests/memory_data_ut/memory_data_ut.c b/tests/memory_data_ut/memory_data_ut.c index bef7f289..eebbecab 100644 --- a/tests/memory_data_ut/memory_data_ut.c +++ b/tests/memory_data_ut/memory_data_ut.c @@ -11,14 +11,14 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(a) +TIMED_TEST_SUITE_INITIALIZE(a, TIMED_TEST_DEFAULT_TIMEOUT_MS) { umock_c_init(on_umock_c_error); (void)umocktypes_stdint_register_types(); } -TEST_SUITE_CLEANUP(b) +TIMED_TEST_SUITE_CLEANUP(b) { umock_c_deinit(); } diff --git a/tests/memory_data_ut/memory_data_ut_pch.h b/tests/memory_data_ut/memory_data_ut_pch.h index c221b657..e29b4a94 100644 --- a/tests/memory_data_ut/memory_data_ut_pch.h +++ b/tests/memory_data_ut/memory_data_ut_pch.h @@ -15,6 +15,7 @@ #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" +#include "c_pal/timed_test_suite.h" #include "c_util/uuid_string.h" @@ -23,4 +24,4 @@ #include "c_util/memory_data.h" -#endif // MEMORY_DATA_UT_PCH_H +#endif // MEMORY_DATA_UT_PCH_H \ No newline at end of file diff --git a/tests/object_lifetime_tracker_ut/object_lifetime_tracker_ut.c b/tests/object_lifetime_tracker_ut/object_lifetime_tracker_ut.c index bfa87a3e..a02112c7 100644 --- a/tests/object_lifetime_tracker_ut/object_lifetime_tracker_ut.c +++ b/tests/object_lifetime_tracker_ut/object_lifetime_tracker_ut.c @@ -173,7 +173,7 @@ static void setup_object_lifetime_tracker_destroy_all_objects_for_key_expectatio BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, umock_c_init(on_umock_c_error), "umock_c_init failed"); ASSERT_ARE_EQUAL(int, 0, umocktypes_bool_register_types(), "umocktypes_bool_register_types"); @@ -200,7 +200,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_TYPE(OBJECT_LIFETIME_TRACKER_ACT_RESULT, OBJECT_LIFETIME_TRACKER_ACT_RESULT); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); } diff --git a/tests/object_lifetime_tracker_ut/object_lifetime_tracker_ut_pch.h b/tests/object_lifetime_tracker_ut/object_lifetime_tracker_ut_pch.h index e89c426b..193f80de 100644 --- a/tests/object_lifetime_tracker_ut/object_lifetime_tracker_ut_pch.h +++ b/tests/object_lifetime_tracker_ut/object_lifetime_tracker_ut_pch.h @@ -18,6 +18,8 @@ #include "umock_c/umocktypes_stdint.h" #include "umock_c/umock_c_negative_tests.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -32,4 +34,4 @@ #include "c_util/object_lifetime_tracker.h" -#endif // OBJECT_LIFETIME_TRACKER_UT_PCH_H +#endif // OBJECT_LIFETIME_TRACKER_UT_PCH_H \ No newline at end of file diff --git a/tests/paged_sparse_array_int/paged_sparse_array_int.c b/tests/paged_sparse_array_int/paged_sparse_array_int.c index f82c6ab4..76e489fe 100644 --- a/tests/paged_sparse_array_int/paged_sparse_array_int.c +++ b/tests/paged_sparse_array_int/paged_sparse_array_int.c @@ -15,6 +15,7 @@ #include "c_pal/interlocked.h" #include "c_pal/thandle.h" #include "c_pal/threadapi.h" +#include "c_pal/timed_test_suite.h" #include "c_util/paged_sparse_array.h" @@ -68,14 +69,14 @@ TEST_DEFINE_ENUM_TYPE(PAGED_SPARSE_ARRAY_GET_RESULT, PAGED_SPARSE_ARRAY_GET_RESU BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { time_t seed = time(NULL); LogInfo("Test using random seed=%u", (unsigned int)seed); srand((unsigned int)seed); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { } @@ -512,4 +513,4 @@ TEST_FUNCTION(PAGED_SPARSE_ARRAY_with_malloc_element_chaos) PAGED_SPARSE_ARRAY_ASSIGN(TEST_ELEMENT_WITH_MALLOC)(&psa, NULL); } -END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) +END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) \ No newline at end of file diff --git a/tests/paged_sparse_array_ut/paged_sparse_array_ut.c b/tests/paged_sparse_array_ut/paged_sparse_array_ut.c index b112c568..24a68498 100644 --- a/tests/paged_sparse_array_ut/paged_sparse_array_ut.c +++ b/tests/paged_sparse_array_ut/paged_sparse_array_ut.c @@ -53,7 +53,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(it_does_something) +TIMED_TEST_SUITE_INITIALIZE(it_does_something, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -62,7 +62,7 @@ TEST_SUITE_INITIALIZE(it_does_something) REGISTER_GBALLOC_HL_GLOBAL_MOCK_HOOK(); } -TEST_SUITE_CLEANUP(TestClassCleanup) +TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); diff --git a/tests/paged_sparse_array_ut/paged_sparse_array_ut_pch.h b/tests/paged_sparse_array_ut/paged_sparse_array_ut_pch.h index 81b9eb8a..6f7c52ed 100644 --- a/tests/paged_sparse_array_ut/paged_sparse_array_ut_pch.h +++ b/tests/paged_sparse_array_ut/paged_sparse_array_ut_pch.h @@ -19,6 +19,8 @@ #include "umock_c/umock_c.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -29,4 +31,4 @@ #include "c_pal/thandle.h" #include "c_util/paged_sparse_array.h" -#endif // PAGED_SPARSE_ARRAY_UT_PCH_H +#endif // PAGED_SPARSE_ARRAY_UT_PCH_H \ No newline at end of file diff --git a/tests/rc_ptr_ut/rc_ptr_ut.c b/tests/rc_ptr_ut/rc_ptr_ut.c index ad52e026..0b8513c4 100644 --- a/tests/rc_ptr_ut/rc_ptr_ut.c +++ b/tests/rc_ptr_ut/rc_ptr_ut.c @@ -27,7 +27,7 @@ static void check_free_func_called(void* context, void* ptr) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, umock_c_init(on_umock_c_error), "umock_c_init failed"); ASSERT_ARE_EQUAL(int, 0, umocktypes_bool_register_types(), "umocktypes_bool_register_types"); @@ -38,7 +38,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_GLOBAL_MOCK_FAIL_RETURN(malloc, NULL); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); } diff --git a/tests/rc_ptr_ut/rc_ptr_ut_pch.h b/tests/rc_ptr_ut/rc_ptr_ut_pch.h index 4de339ef..5fe2e358 100644 --- a/tests/rc_ptr_ut/rc_ptr_ut_pch.h +++ b/tests/rc_ptr_ut/rc_ptr_ut_pch.h @@ -20,6 +20,8 @@ #include "c_pal/interlocked.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -29,4 +31,4 @@ #include "c_util/rc_ptr.h" -#endif // RC_PTR_UT_PCH_H +#endif // RC_PTR_UT_PCH_H \ No newline at end of file diff --git a/tests/rc_string_array_ut/rc_string_array_ut.c b/tests/rc_string_array_ut/rc_string_array_ut.c index 1617944b..bfc696f2 100644 --- a/tests/rc_string_array_ut/rc_string_array_ut.c +++ b/tests/rc_string_array_ut/rc_string_array_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "rc_string_array_ut_pch.h" @@ -12,7 +12,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -27,7 +27,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_ALIAS_TYPE(THANDLE(RC_STRING), void*); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/rc_string_array_ut/rc_string_array_ut_pch.h b/tests/rc_string_array_ut/rc_string_array_ut_pch.h index ddf84076..b3763464 100644 --- a/tests/rc_string_array_ut/rc_string_array_ut_pch.h +++ b/tests/rc_string_array_ut/rc_string_array_ut_pch.h @@ -19,6 +19,8 @@ #include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to interlocked.h - at the moment verified through int tests - this is porting legacy code, temporary solution*/ +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -34,4 +36,4 @@ #include "c_util/rc_string_array.h" -#endif // RC_STRING_ARRAY_UT_PCH_H +#endif // RC_STRING_ARRAY_UT_PCH_H \ No newline at end of file diff --git a/tests/rc_string_ut/rc_string_ut.c b/tests/rc_string_ut/rc_string_ut.c index b4afe2be..0cfe3136 100644 --- a/tests/rc_string_ut/rc_string_ut.c +++ b/tests/rc_string_ut/rc_string_ut.c @@ -77,7 +77,7 @@ MOCK_FUNCTION_END() BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_initialize) +TIMED_TEST_SUITE_INITIALIZE(suite_initialize, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -97,7 +97,7 @@ TEST_SUITE_INITIALIZE(suite_initialize) REGISTER_GLOBAL_MOCK_FAIL_RETURN(malloc, NULL); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/rc_string_ut/rc_string_ut_pch.h b/tests/rc_string_ut/rc_string_ut_pch.h index ff1de471..a12e93fc 100644 --- a/tests/rc_string_ut/rc_string_ut_pch.h +++ b/tests/rc_string_ut/rc_string_ut_pch.h @@ -20,6 +20,8 @@ #include "umock_c/umock_c_negative_tests.h" #include "umock_c/umocktypes_charptr.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -32,4 +34,4 @@ #include "c_util/rc_string.h" -#endif // RC_STRING_UT_PCH_H +#endif // RC_STRING_UT_PCH_H \ No newline at end of file diff --git a/tests/rc_string_utils_ut/rc_string_utils_ut.c b/tests/rc_string_utils_ut/rc_string_utils_ut.c index 96278e9a..116daf98 100644 --- a/tests/rc_string_utils_ut/rc_string_utils_ut.c +++ b/tests/rc_string_utils_ut/rc_string_utils_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "rc_string_utils_ut_pch.h" @@ -35,7 +35,7 @@ static void validate_split(RC_STRING_ARRAY* result, uint32_t count, const char** BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -53,7 +53,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_ALIAS_TYPE(THANDLE(RC_STRING), void*); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/rc_string_utils_ut/rc_string_utils_ut_pch.h b/tests/rc_string_utils_ut/rc_string_utils_ut_pch.h index 9c6e35d6..3f3fec8a 100644 --- a/tests/rc_string_utils_ut/rc_string_utils_ut_pch.h +++ b/tests/rc_string_utils_ut/rc_string_utils_ut_pch.h @@ -17,6 +17,8 @@ #include "umock_c/umocktypes.h" #include "umock_c/umock_c_negative_tests.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -40,4 +42,4 @@ CTEST_DECLARE_EQUALITY_ASSERTION_FUNCTIONS_FOR_TYPE(TEST_THANDLE_RC_STRING); -#endif // RC_STRING_UTILS_UT_PCH_H +#endif // RC_STRING_UTILS_UT_PCH_H \ No newline at end of file diff --git a/tests/reals_ut/c_util_reals_ut_pch.h b/tests/reals_ut/c_util_reals_ut_pch.h index 3481a464..2b4576e5 100644 --- a/tests/reals_ut/c_util_reals_ut_pch.h +++ b/tests/reals_ut/c_util_reals_ut_pch.h @@ -7,6 +7,7 @@ #define C_UTIL_REALS_UT_PCH_H #include "testrunnerswitcher.h" +#include "c_pal/timed_test_suite.h" #define REGISTER_GLOBAL_MOCK_HOOK(original, real) \ (original == real) ? (void)0 : (void)1; @@ -64,4 +65,4 @@ #include "c_util/thread_notifications_dispatcher.h" #endif -#endif // C_UTIL_REALS_UT_PCH_H +#endif // C_UTIL_REALS_UT_PCH_H \ No newline at end of file diff --git a/tests/singlylinkedlist_ut/singlylinkedlist_ut.c b/tests/singlylinkedlist_ut/singlylinkedlist_ut.c index ffc78a9d..6451142c 100644 --- a/tests/singlylinkedlist_ut/singlylinkedlist_ut.c +++ b/tests/singlylinkedlist_ut/singlylinkedlist_ut.c @@ -19,7 +19,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { int result; @@ -33,7 +33,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_ALIAS_TYPE(LIST_ITEM_HANDLE, void*); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); } diff --git a/tests/singlylinkedlist_ut/singlylinkedlist_ut_pch.h b/tests/singlylinkedlist_ut/singlylinkedlist_ut_pch.h index 4bda48e6..d08b6ae7 100644 --- a/tests/singlylinkedlist_ut/singlylinkedlist_ut_pch.h +++ b/tests/singlylinkedlist_ut/singlylinkedlist_ut_pch.h @@ -16,6 +16,8 @@ #include "umock_c/umocktypes_bool.h" #include "c_util/singlylinkedlist.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS /* test match function mock */ @@ -28,4 +30,4 @@ #define TEST_CONTEXT ((const void*)0x4242) -#endif // SINGLYLINKEDLIST_UT_PCH_H +#endif // SINGLYLINKEDLIST_UT_PCH_H \ No newline at end of file diff --git a/tests/sliding_window_average_by_count_ut/sliding_window_average_by_count_ut.c b/tests/sliding_window_average_by_count_ut/sliding_window_average_by_count_ut.c index 4106d9c7..7b263b17 100644 --- a/tests/sliding_window_average_by_count_ut/sliding_window_average_by_count_ut.c +++ b/tests/sliding_window_average_by_count_ut/sliding_window_average_by_count_ut.c @@ -23,7 +23,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -41,7 +41,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_GLOBAL_MOCK_FAIL_RETURN(malloc, NULL); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); real_gballoc_hl_deinit(); diff --git a/tests/sliding_window_average_by_count_ut/sliding_window_average_by_count_ut_pch.h b/tests/sliding_window_average_by_count_ut/sliding_window_average_by_count_ut_pch.h index b0f03dc5..bccfbb23 100644 --- a/tests/sliding_window_average_by_count_ut/sliding_window_average_by_count_ut_pch.h +++ b/tests/sliding_window_average_by_count_ut/sliding_window_average_by_count_ut_pch.h @@ -19,6 +19,8 @@ #include "umock_c/umocktypes_stdint.h" #include "umock_c/umocktypes_struct.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -38,4 +40,4 @@ #include "c_util/sliding_window_average_by_count.h" -#endif // SLIDING_WINDOW_AVERAGE_BY_COUNT_UT_PCH_H +#endif // SLIDING_WINDOW_AVERAGE_BY_COUNT_UT_PCH_H \ No newline at end of file diff --git a/tests/strings_ut/strings_ut.c b/tests/strings_ut/strings_ut.c index dd83d5b3..c9ba8d2b 100644 --- a/tests/strings_ut/strings_ut.c +++ b/tests/strings_ut/strings_ut.c @@ -46,7 +46,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) - TEST_SUITE_INITIALIZE(setsBufferTempSize) + TIMED_TEST_SUITE_INITIALIZE(setsBufferTempSize, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -60,7 +60,7 @@ BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) REGISTER_GLOBAL_MOCK_FAIL_RETURN(realloc, NULL); } - TEST_SUITE_CLEANUP(TestClassCleanup) + TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); diff --git a/tests/strings_ut/strings_ut_pch.h b/tests/strings_ut/strings_ut_pch.h index 56ca6067..2dffa987 100644 --- a/tests/strings_ut/strings_ut_pch.h +++ b/tests/strings_ut/strings_ut_pch.h @@ -15,6 +15,8 @@ #include "umock_c/umock_c_negative_tests.h" #include "umock_c/umocktypes_charptr.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" @@ -26,4 +28,4 @@ #include "c_util/strings.h" -#endif // STRINGS_UT_PCH_H +#endif // STRINGS_UT_PCH_H \ No newline at end of file diff --git a/tests/sync_wrapper_ut/sync_wrapper_ut.c b/tests/sync_wrapper_ut/sync_wrapper_ut.c index 43aa7af6..92c6c99a 100644 --- a/tests/sync_wrapper_ut/sync_wrapper_ut.c +++ b/tests/sync_wrapper_ut/sync_wrapper_ut.c @@ -111,7 +111,7 @@ INTERLOCKED_HL_RESULT my_InterlockedHL_WaitForValue(int32_t volatile_atomic* add BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -144,7 +144,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_TYPE(INTERLOCKED_HL_RESULT, INTERLOCKED_HL_RESULT); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/sync_wrapper_ut/sync_wrapper_ut_pch.h b/tests/sync_wrapper_ut/sync_wrapper_ut_pch.h index 873c023a..1cefb540 100644 --- a/tests/sync_wrapper_ut/sync_wrapper_ut_pch.h +++ b/tests/sync_wrapper_ut/sync_wrapper_ut_pch.h @@ -21,6 +21,8 @@ #include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to interlocked.h - at the moment verified through int tests - this is porting legacy code, temporary solution*/ #include "c_pal/sync.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to sync.h - at the moment verified through int tests - this is porting legacy code, temporary solution*/ +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" @@ -42,4 +44,4 @@ #include "c_util/sync_wrapper.h" -#endif // SYNC_WRAPPER_UT_PCH_H +#endif // SYNC_WRAPPER_UT_PCH_H \ No newline at end of file diff --git a/tests/tarray_2_int/tarray_2_int.c b/tests/tarray_2_int/tarray_2_int.c index 829e0557..6732f363 100644 --- a/tests/tarray_2_int/tarray_2_int.c +++ b/tests/tarray_2_int/tarray_2_int.c @@ -15,6 +15,7 @@ #include "c_pal/threadapi.h" #include "c_pal/thandle.h" +#include "c_pal/timed_test_suite.h" #include "c_util/tarray.h" TEST_DEFINE_ENUM_TYPE(THREADAPI_RESULT, THREADAPI_RESULT_VALUES); @@ -36,11 +37,11 @@ TARRAY_TYPE_DEFINE(CAT); BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(it_does_something) +TIMED_TEST_SUITE_INITIALIZE(it_does_something, TIMED_TEST_DEFAULT_TIMEOUT_MS) { } -TEST_SUITE_CLEANUP(it_undoes_something) +TIMED_TEST_SUITE_CLEANUP(it_undoes_something) { } @@ -196,4 +197,3 @@ TEST_FUNCTION(an_array_of_cats_can_have_their_names_uniquely_freed_2) } END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) - diff --git a/tests/tarray_int/tarray_int.c b/tests/tarray_int/tarray_int.c index 62c0bcea..b97b78e3 100644 --- a/tests/tarray_int/tarray_int.c +++ b/tests/tarray_int/tarray_int.c @@ -16,6 +16,7 @@ #include "umock_c/umock_c.h" #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" +#include "c_pal/timed_test_suite.h" #include "play_undo_op_types.h" #include "play_undo_op_tarray_types.h" #include "umock_c/umock_c_DISABLE_MOCKS.h" // ============================== DISABLE_MOCKS @@ -34,7 +35,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(it_does_something) +TIMED_TEST_SUITE_INITIALIZE(it_does_something, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -48,7 +49,7 @@ TEST_SUITE_INITIALIZE(it_does_something) REGISTER_TARRAY_UNDO_OP_GLOBAL_MOCK_HOOK(); } -TEST_SUITE_CLEANUP(TestClassCleanup) +TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); @@ -84,4 +85,3 @@ TEST_FUNCTION(play_create_succeeds) } END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) - diff --git a/tests/tarray_ut/tarray_ut.c b/tests/tarray_ut/tarray_ut.c index 4203c18c..d24eb983 100644 --- a/tests/tarray_ut/tarray_ut.c +++ b/tests/tarray_ut/tarray_ut.c @@ -43,7 +43,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(it_does_something) +TIMED_TEST_SUITE_INITIALIZE(it_does_something, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -52,7 +52,7 @@ TEST_SUITE_INITIALIZE(it_does_something) REGISTER_GBALLOC_HL_GLOBAL_MOCK_HOOK(); } -TEST_SUITE_CLEANUP(TestClassCleanup) +TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); diff --git a/tests/tarray_ut/tarray_ut_pch.h b/tests/tarray_ut/tarray_ut_pch.h index 099c641d..4237791e 100644 --- a/tests/tarray_ut/tarray_ut_pch.h +++ b/tests/tarray_ut/tarray_ut_pch.h @@ -17,6 +17,8 @@ #include "umock_c/umock_c.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -27,4 +29,4 @@ #include "c_pal/thandle.h" #include "c_util/tarray.h" -#endif // TARRAY_UT_PCH_H +#endif // TARRAY_UT_PCH_H \ No newline at end of file diff --git a/tests/tcall_dispatcher_int/tcall_dispatcher_int.c b/tests/tcall_dispatcher_int/tcall_dispatcher_int.c index a6341b3f..1bfb15ab 100644 --- a/tests/tcall_dispatcher_int/tcall_dispatcher_int.c +++ b/tests/tcall_dispatcher_int/tcall_dispatcher_int.c @@ -14,6 +14,7 @@ #include "c_pal/interlocked.h" #include "c_pal/thandle.h" #include "c_pal/threadapi.h" +#include "c_pal/timed_test_suite.h" #include "c_util/tcall_dispatcher.h" #include "tcall_dispatcher_foo.h" @@ -69,11 +70,11 @@ TEST_DEFINE_ENUM_TYPE(THREADAPI_RESULT, THREADAPI_RESULT_VALUES); BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { } @@ -330,4 +331,4 @@ TEST_FUNCTION(TCALL_DISPATCHER_chaos_knight_test) TCALL_DISPATCHER_ASSIGN(FOO)(&test_context.call_dispatcher, NULL); } -END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) +END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) \ No newline at end of file diff --git a/tests/tcall_dispatcher_ut/tcall_dispatcher_ut.c b/tests/tcall_dispatcher_ut/tcall_dispatcher_ut.c index bd8446ef..bc3cfa75 100644 --- a/tests/tcall_dispatcher_ut/tcall_dispatcher_ut.c +++ b/tests/tcall_dispatcher_ut/tcall_dispatcher_ut.c @@ -47,7 +47,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -67,7 +67,7 @@ TEST_SUITE_INITIALIZE(suite_init) ASSERT_ARE_EQUAL(int, 0, umock_c_negative_tests_init()); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_negative_tests_deinit(); umock_c_deinit(); diff --git a/tests/tcall_dispatcher_ut/tcall_dispatcher_ut_pch.h b/tests/tcall_dispatcher_ut/tcall_dispatcher_ut_pch.h index dfc4135f..94f7314d 100644 --- a/tests/tcall_dispatcher_ut/tcall_dispatcher_ut_pch.h +++ b/tests/tcall_dispatcher_ut/tcall_dispatcher_ut_pch.h @@ -20,6 +20,8 @@ #include "c_pal/thandle.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" @@ -37,4 +39,4 @@ #include "c_util/tcall_dispatcher.h" -#endif // TCALL_DISPATCHER_UT_PCH_H +#endif // TCALL_DISPATCHER_UT_PCH_H \ No newline at end of file diff --git a/tests/thandle_tuple_array_ut/thandle_tuple_array_ut.c b/tests/thandle_tuple_array_ut/thandle_tuple_array_ut.c index 175a599e..5a3ec809 100644 --- a/tests/thandle_tuple_array_ut/thandle_tuple_array_ut.c +++ b/tests/thandle_tuple_array_ut/thandle_tuple_array_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "thandle_tuple_array_ut_pch.h" @@ -27,7 +27,7 @@ DEFINE_THANDLE_TUPLE_ARRAY(TUPLE_THREE, TUPLE_THREE_FIELDS); BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -42,7 +42,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_ALIAS_TYPE(THANDLE(RC_STRING), void*); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/thandle_tuple_array_ut/thandle_tuple_array_ut_pch.h b/tests/thandle_tuple_array_ut/thandle_tuple_array_ut_pch.h index a13548dd..b7376843 100644 --- a/tests/thandle_tuple_array_ut/thandle_tuple_array_ut_pch.h +++ b/tests/thandle_tuple_array_ut/thandle_tuple_array_ut_pch.h @@ -19,6 +19,8 @@ #include "c_pal/interlocked.h" /*included for mocking reasons - it will prohibit creation of mocks belonging to interlocked.h - at the moment verified through int tests - this is porting legacy code, temporary solution*/ +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -34,4 +36,4 @@ #include "c_util/thandle_tuple_array.h" -#endif // THANDLE_TUPLE_ARRAY_UT_PCH_H +#endif // THANDLE_TUPLE_ARRAY_UT_PCH_H \ No newline at end of file diff --git a/tests/thread_notifications_dispatcher_int/thread_notifications_dispatcher_int.c b/tests/thread_notifications_dispatcher_int/thread_notifications_dispatcher_int.c index f18d050b..a387e215 100644 --- a/tests/thread_notifications_dispatcher_int/thread_notifications_dispatcher_int.c +++ b/tests/thread_notifications_dispatcher_int/thread_notifications_dispatcher_int.c @@ -16,6 +16,7 @@ #include "c_pal/interlocked.h" #include "c_pal/interlocked_hl.h" #include "c_pal/sync.h" +#include "c_pal/timed_test_suite.h" #include "thread_notifications_lackey_dll/thread_notifications_lackey_dll.h" #include "c_util/tcall_dispatcher_thread_notification_call.h" @@ -23,12 +24,12 @@ BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, gballoc_hl_init(NULL, NULL)); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { gballoc_hl_deinit(); } @@ -138,4 +139,4 @@ TEST_FUNCTION(MU_C3(thread_notifications_dispatcher_creating_threads_dispatches_ free((void*)expect_notification_states); } -END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) +END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) \ No newline at end of file diff --git a/tests/thread_notifications_dispatcher_ut/thread_notifications_dispatcher_ut.c b/tests/thread_notifications_dispatcher_ut/thread_notifications_dispatcher_ut.c index 9e241d30..9d9da061 100644 --- a/tests/thread_notifications_dispatcher_ut/thread_notifications_dispatcher_ut.c +++ b/tests/thread_notifications_dispatcher_ut/thread_notifications_dispatcher_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license.See LICENSE file in the project root for full license information. #include "thread_notifications_dispatcher_ut_pch.h" @@ -15,7 +15,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -33,7 +33,7 @@ TEST_SUITE_INITIALIZE(suite_init) ASSERT_ARE_EQUAL(int, 0, umock_c_negative_tests_init()); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_negative_tests_deinit(); umock_c_deinit(); diff --git a/tests/thread_notifications_dispatcher_ut/thread_notifications_dispatcher_ut_pch.h b/tests/thread_notifications_dispatcher_ut/thread_notifications_dispatcher_ut_pch.h index dcbfa412..a4df5315 100644 --- a/tests/thread_notifications_dispatcher_ut/thread_notifications_dispatcher_ut_pch.h +++ b/tests/thread_notifications_dispatcher_ut/thread_notifications_dispatcher_ut_pch.h @@ -17,6 +17,8 @@ #include "c_pal/thandle.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" @@ -31,4 +33,4 @@ #include "c_util/thread_notifications_dispatcher.h" -#endif // THREAD_NOTIFICATIONS_DISPATCHER_UT_PCH_H +#endif // THREAD_NOTIFICATIONS_DISPATCHER_UT_PCH_H \ No newline at end of file diff --git a/tests/thread_notifications_dispatcher_wo_init_ut/thread_notifications_dispatcher_wo_init_ut.c b/tests/thread_notifications_dispatcher_wo_init_ut/thread_notifications_dispatcher_wo_init_ut.c index bd6c8443..9e3e0756 100644 --- a/tests/thread_notifications_dispatcher_wo_init_ut/thread_notifications_dispatcher_wo_init_ut.c +++ b/tests/thread_notifications_dispatcher_wo_init_ut/thread_notifications_dispatcher_wo_init_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license.See LICENSE file in the project root for full license information. #include "thread_notifications_dispatcher_wo_init_ut_pch.h" @@ -15,7 +15,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -33,7 +33,7 @@ TEST_SUITE_INITIALIZE(suite_init) ASSERT_ARE_EQUAL(int, 0, umock_c_negative_tests_init()); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_negative_tests_deinit(); umock_c_deinit(); diff --git a/tests/thread_notifications_dispatcher_wo_init_ut/thread_notifications_dispatcher_wo_init_ut_pch.h b/tests/thread_notifications_dispatcher_wo_init_ut/thread_notifications_dispatcher_wo_init_ut_pch.h index ef92e167..5dbbedef 100644 --- a/tests/thread_notifications_dispatcher_wo_init_ut/thread_notifications_dispatcher_wo_init_ut_pch.h +++ b/tests/thread_notifications_dispatcher_wo_init_ut/thread_notifications_dispatcher_wo_init_ut_pch.h @@ -20,6 +20,8 @@ #include "c_pal/thandle.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" @@ -34,4 +36,4 @@ #include "c_util/thread_notifications_dispatcher.h" -#endif // THREAD_NOTIFICATIONS_DISPATCHER_WO_INIT_UT_PCH_H +#endif // THREAD_NOTIFICATIONS_DISPATCHER_WO_INIT_UT_PCH_H \ No newline at end of file diff --git a/tests/tp_worker_thread_int/tp_worker_thread_int.c b/tests/tp_worker_thread_int/tp_worker_thread_int.c index 2b2ecf39..36787848 100644 --- a/tests/tp_worker_thread_int/tp_worker_thread_int.c +++ b/tests/tp_worker_thread_int/tp_worker_thread_int.c @@ -14,6 +14,7 @@ #include "c_pal/interlocked_hl.h" #include "c_pal/sync.h" #include "c_pal/threadapi.h" +#include "c_pal/timed_test_suite.h" #include "c_util/tp_worker_thread.h" @@ -52,11 +53,11 @@ static void worker_thread_func(void* context) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { } @@ -243,4 +244,4 @@ TEST_FUNCTION(worker_thread_chaos_knight) execution_engine_dec_ref(execution_engine); } -END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) +END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) \ No newline at end of file diff --git a/tests/tp_worker_thread_ut/tp_worker_thread_ut.c b/tests/tp_worker_thread_ut/tp_worker_thread_ut.c index 5af6408f..b6141669 100644 --- a/tests/tp_worker_thread_ut/tp_worker_thread_ut.c +++ b/tests/tp_worker_thread_ut/tp_worker_thread_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. #include "tp_worker_thread_ut_pch.h" @@ -178,7 +178,7 @@ static void expect_destroy(void) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -209,7 +209,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_ALIAS_TYPE(THANDLE(THREADPOOL_WORK_ITEM), void*); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/tp_worker_thread_ut/tp_worker_thread_ut_pch.h b/tests/tp_worker_thread_ut/tp_worker_thread_ut_pch.h index 945930b3..b2cf4cf3 100644 --- a/tests/tp_worker_thread_ut/tp_worker_thread_ut_pch.h +++ b/tests/tp_worker_thread_ut/tp_worker_thread_ut_pch.h @@ -19,6 +19,8 @@ #include "umock_c/umocktypes_charptr.h" #include "umock_c/umocktypes_stdint.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -41,4 +43,4 @@ #include "real_threadpool_thandle.h" #include "real_threadpool_work_item_thandle.h" -#endif // TP_WORKER_THREAD_UT_PCH_H +#endif // TP_WORKER_THREAD_UT_PCH_H \ No newline at end of file diff --git a/tests/two_d_array_int/two_d_array_int.c b/tests/two_d_array_int/two_d_array_int.c index 01da0026..0f83d817 100644 --- a/tests/two_d_array_int/two_d_array_int.c +++ b/tests/two_d_array_int/two_d_array_int.c @@ -14,6 +14,7 @@ #include "c_pal/interlocked.h" #include "c_pal/thandle.h" #include "c_pal/threadapi.h" +#include "c_pal/timed_test_suite.h" #include "c_util/two_d_array.h" @@ -41,14 +42,14 @@ TEST_DEFINE_ENUM_TYPE(TWO_D_ARRAY_GET_ROW_RESULT, TWO_D_ARRAY_GET_ROW_RESULT_VAL BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { time_t seed = time(NULL); LogInfo("Test using random seed=%u", (unsigned int)seed); srand((unsigned int)seed); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { } @@ -309,4 +310,4 @@ TEST_FUNCTION(TWO_D_ARRAY_chaos) TWO_D_ARRAY_ASSIGN(TEST_THANDLE)(&tdarr, NULL); } -END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) +END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) \ No newline at end of file diff --git a/tests/two_d_array_ut/two_d_array_ut.c b/tests/two_d_array_ut/two_d_array_ut.c index 42b83965..74f2e4d4 100644 --- a/tests/two_d_array_ut/two_d_array_ut.c +++ b/tests/two_d_array_ut/two_d_array_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "two_d_array_ut_pch.h" @@ -52,7 +52,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(it_does_something) +TIMED_TEST_SUITE_INITIALIZE(it_does_something, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -61,7 +61,7 @@ TEST_SUITE_INITIALIZE(it_does_something) REGISTER_GBALLOC_HL_GLOBAL_MOCK_HOOK(); } -TEST_SUITE_CLEANUP(TestClassCleanup) +TIMED_TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); diff --git a/tests/two_d_array_ut/two_d_array_ut_pch.h b/tests/two_d_array_ut/two_d_array_ut_pch.h index a3192996..a16c5c02 100644 --- a/tests/two_d_array_ut/two_d_array_ut_pch.h +++ b/tests/two_d_array_ut/two_d_array_ut_pch.h @@ -18,6 +18,8 @@ #include "umock_c/umock_c.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -28,4 +30,4 @@ #include "c_pal/thandle.h" #include "c_util/two_d_array.h" -#endif // TWO_D_ARRAY_UT_PCH_H +#endif // TWO_D_ARRAY_UT_PCH_H \ No newline at end of file diff --git a/tests/uuid_string_ut/uuid_string_ut.c b/tests/uuid_string_ut/uuid_string_ut.c index 85b6bc09..d70cba0f 100644 --- a/tests/uuid_string_ut/uuid_string_ut.c +++ b/tests/uuid_string_ut/uuid_string_ut.c @@ -15,7 +15,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -29,7 +29,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_GBALLOC_HL_GLOBAL_MOCK_HOOK(); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/uuid_string_ut/uuid_string_ut_pch.h b/tests/uuid_string_ut/uuid_string_ut_pch.h index 35c56e37..254d1470 100644 --- a/tests/uuid_string_ut/uuid_string_ut_pch.h +++ b/tests/uuid_string_ut/uuid_string_ut_pch.h @@ -16,6 +16,8 @@ #include "umock_c/umocktypes_charptr.h" #include "umock_c/umock_c_negative_tests.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -29,4 +31,4 @@ #include "c_util/uuid_string.h" -#endif // UUID_STRING_UT_PCH_H +#endif // UUID_STRING_UT_PCH_H \ No newline at end of file diff --git a/tests/watchdog_int/watchdog_int.c b/tests/watchdog_int/watchdog_int.c index 24df3181..25bdbcb6 100644 --- a/tests/watchdog_int/watchdog_int.c +++ b/tests/watchdog_int/watchdog_int.c @@ -20,6 +20,7 @@ #include "c_pal/interlocked_hl.h" #include "c_util/rc_string.h" #include "c_pal/thandle.h" +#include "c_pal/timed_test_suite.h" #include "c_util/watchdog.h" #include "c_util/watchdog_threadpool.h" @@ -78,12 +79,12 @@ static int test_watchdog_reset_thread(void* context) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, gballoc_hl_init(NULL, NULL)); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { gballoc_hl_deinit(); } @@ -284,4 +285,4 @@ TEST_FUNCTION(can_run_watchdog_reset_concurrently) THANDLE_ASSIGN(THREADPOOL)(&threadpool, NULL); } -END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) +END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) \ No newline at end of file diff --git a/tests/watchdog_threadpool_ut/watchdog_threadpool_ut.c b/tests/watchdog_threadpool_ut/watchdog_threadpool_ut.c index f38d5df5..f832ba2c 100644 --- a/tests/watchdog_threadpool_ut/watchdog_threadpool_ut.c +++ b/tests/watchdog_threadpool_ut/watchdog_threadpool_ut.c @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Microsoft. All rights reserved. #include "watchdog_threadpool_ut_pch.h" @@ -84,7 +84,7 @@ static void dispose_REAL_THREADPOOL_do_nothing(REAL_THREADPOOL* nothing) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -110,7 +110,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_GLOBAL_MOCK_HOOK(THANDLE_INITIALIZE(THREADPOOL), THANDLE_INITIALIZE(REAL_THREADPOOL)); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { THANDLE_ASSIGN(REAL_THREADPOOL)(&g.test_threadpool, NULL); diff --git a/tests/watchdog_threadpool_ut/watchdog_threadpool_ut_pch.h b/tests/watchdog_threadpool_ut/watchdog_threadpool_ut_pch.h index a46ce103..2d4a9089 100644 --- a/tests/watchdog_threadpool_ut/watchdog_threadpool_ut_pch.h +++ b/tests/watchdog_threadpool_ut/watchdog_threadpool_ut_pch.h @@ -16,6 +16,8 @@ #include "umock_c/umocktypes_stdint.h" #include "umock_c/umock_c_negative_tests.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -30,4 +32,4 @@ #include "c_util/watchdog_threadpool.h" -#endif // WATCHDOG_THREADPOOL_UT_PCH_H +#endif // WATCHDOG_THREADPOOL_UT_PCH_H \ No newline at end of file diff --git a/tests/watchdog_ut/watchdog_ut.c b/tests/watchdog_ut/watchdog_ut.c index 00e88fbf..1bfc232d 100644 --- a/tests/watchdog_ut/watchdog_ut.c +++ b/tests/watchdog_ut/watchdog_ut.c @@ -66,7 +66,7 @@ static WATCHDOG_HANDLE do_start(THREADPOOL_WORK_FUNCTION* callback, void** conte BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -92,7 +92,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_UMOCK_ALIAS_TYPE(SM_HANDLE, void*); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/watchdog_ut/watchdog_ut_pch.h b/tests/watchdog_ut/watchdog_ut_pch.h index ef8a43b6..efe5f19e 100644 --- a/tests/watchdog_ut/watchdog_ut_pch.h +++ b/tests/watchdog_ut/watchdog_ut_pch.h @@ -18,6 +18,8 @@ #include "umock_c/umock_c_negative_tests.h" #include "umock_c/umocktypes_bool.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -41,4 +43,4 @@ #include "c_util/watchdog.h" -#endif // WATCHDOG_UT_PCH_H +#endif // WATCHDOG_UT_PCH_H \ No newline at end of file diff --git a/tests/worker_thread_int/worker_thread_int.c b/tests/worker_thread_int/worker_thread_int.c index 489535d5..89688d8a 100644 --- a/tests/worker_thread_int/worker_thread_int.c +++ b/tests/worker_thread_int/worker_thread_int.c @@ -11,6 +11,7 @@ #include "c_pal/interlocked_hl.h" #include "c_pal/sync.h" #include "c_pal/threadapi.h" +#include "c_pal/timed_test_suite.h" #include "c_util/worker_thread.h" @@ -33,11 +34,11 @@ static void worker_thread_func(void* context) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { } @@ -204,4 +205,4 @@ TEST_FUNCTION(worker_thread_chaos_knight) worker_thread_destroy(worker_handle); } -END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) +END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) \ No newline at end of file diff --git a/tests/worker_thread_ut/worker_thread_ut.c b/tests/worker_thread_ut/worker_thread_ut.c index 0ccd22da..69614074 100644 --- a/tests/worker_thread_ut/worker_thread_ut.c +++ b/tests/worker_thread_ut/worker_thread_ut.c @@ -74,7 +74,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, real_gballoc_hl_init(NULL, NULL)); @@ -100,7 +100,7 @@ TEST_SUITE_INITIALIZE(suite_init) REGISTER_TYPE(WORKER_THREAD_SCHEDULE_PROCESS_RESULT, WORKER_THREAD_SCHEDULE_PROCESS_RESULT); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); diff --git a/tests/worker_thread_ut/worker_thread_ut_pch.h b/tests/worker_thread_ut/worker_thread_ut_pch.h index 634bbecf..a9d13928 100644 --- a/tests/worker_thread_ut/worker_thread_ut_pch.h +++ b/tests/worker_thread_ut/worker_thread_ut_pch.h @@ -18,6 +18,8 @@ #include "umock_c/umock_c_negative_tests.h" #include "umock_c/umocktypes_stdint.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/gballoc_hl.h" #include "c_pal/gballoc_hl_redirect.h" @@ -35,4 +37,4 @@ #include "c_util/worker_thread.h" -#endif // WORKER_THREAD_UT_PCH_H +#endif // WORKER_THREAD_UT_PCH_H \ No newline at end of file diff --git a/thread_notifications_lackey_dll/tests/thread_notif_lackey_dll_wo_init_ut/thread_notif_lackey_dll_wo_init_ut.c b/thread_notifications_lackey_dll/tests/thread_notif_lackey_dll_wo_init_ut/thread_notif_lackey_dll_wo_init_ut.c index 0780c47a..891cdc77 100644 --- a/thread_notifications_lackey_dll/tests/thread_notif_lackey_dll_wo_init_ut/thread_notif_lackey_dll_wo_init_ut.c +++ b/thread_notifications_lackey_dll/tests/thread_notif_lackey_dll_wo_init_ut/thread_notif_lackey_dll_wo_init_ut.c @@ -22,7 +22,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, umock_c_init(on_umock_c_error), "umock_c_init failed"); ASSERT_ARE_EQUAL(int, 0, umocktypes_windows_register_types(), "umocktypes_windows_register_types failed"); @@ -32,7 +32,7 @@ TEST_SUITE_INITIALIZE(suite_init) ASSERT_ARE_EQUAL(int, 0, umock_c_negative_tests_init()); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_negative_tests_deinit(); umock_c_deinit(); diff --git a/thread_notifications_lackey_dll/tests/thread_notif_lackey_dll_wo_init_ut/thread_notif_lackey_dll_wo_init_ut_pch.h b/thread_notifications_lackey_dll/tests/thread_notif_lackey_dll_wo_init_ut/thread_notif_lackey_dll_wo_init_ut_pch.h index 1f9cc28a..c4244c20 100644 --- a/thread_notifications_lackey_dll/tests/thread_notif_lackey_dll_wo_init_ut/thread_notif_lackey_dll_wo_init_ut_pch.h +++ b/thread_notifications_lackey_dll/tests/thread_notif_lackey_dll_wo_init_ut/thread_notif_lackey_dll_wo_init_ut_pch.h @@ -23,6 +23,8 @@ #include "c_pal/interlocked.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/ps_util.h" @@ -31,4 +33,4 @@ #include "thread_notifications_lackey_dll/thread_notifications_lackey_dll.h" -#endif // THREAD_NOTIF_LACKEY_DLL_WO_INIT_UT_PCH_H +#endif // THREAD_NOTIF_LACKEY_DLL_WO_INIT_UT_PCH_H \ No newline at end of file diff --git a/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_int/thread_notifications_lackey_dll_int.c b/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_int/thread_notifications_lackey_dll_int.c index 4cf057f9..0a5e00da 100644 --- a/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_int/thread_notifications_lackey_dll_int.c +++ b/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_int/thread_notifications_lackey_dll_int.c @@ -11,6 +11,7 @@ #include "c_pal/interlocked.h" #include "c_pal/threadapi.h" +#include "c_pal/timed_test_suite.h" #include "thread_notifications_lackey_dll/thread_notifications_lackey_dll.h" @@ -24,11 +25,11 @@ MU_DEFINE_ENUM_STRINGS(THREAD_NOTIFICATIONS_LACKEY_DLL_REASON, THREAD_NOTIFICATI BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { } @@ -156,4 +157,4 @@ TEST_FUNCTION(MU_C3(thread_notifications_lackey_dll_attach_and_detach_of_, N_THR thread_notifications_lackey_dll_deinit_callback(); } -END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) +END_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) \ No newline at end of file diff --git a/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_ut/thread_notifications_lackey_dll_ut.c b/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_ut/thread_notifications_lackey_dll_ut.c index 4b4e6eb8..94958b43 100644 --- a/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_ut/thread_notifications_lackey_dll_ut.c +++ b/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_ut/thread_notifications_lackey_dll_ut.c @@ -31,7 +31,7 @@ static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) BEGIN_TEST_SUITE(TEST_SUITE_NAME_FROM_CMAKE) -TEST_SUITE_INITIALIZE(suite_init) +TIMED_TEST_SUITE_INITIALIZE(suite_init, TIMED_TEST_DEFAULT_TIMEOUT_MS) { ASSERT_ARE_EQUAL(int, 0, umock_c_init(on_umock_c_error), "umock_c_init failed"); ASSERT_ARE_EQUAL(int, 0, umocktypes_windows_register_types(), "umocktypes_windows_register_types failed"); @@ -42,7 +42,7 @@ TEST_SUITE_INITIALIZE(suite_init) ASSERT_ARE_EQUAL(int, 0, umock_c_negative_tests_init()); } -TEST_SUITE_CLEANUP(suite_cleanup) +TIMED_TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_negative_tests_deinit(); umock_c_deinit(); diff --git a/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_ut/thread_notifications_lackey_dll_ut_pch.h b/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_ut/thread_notifications_lackey_dll_ut_pch.h index 07368213..4ef78130 100644 --- a/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_ut/thread_notifications_lackey_dll_ut_pch.h +++ b/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_ut/thread_notifications_lackey_dll_ut_pch.h @@ -23,6 +23,8 @@ #include "c_pal/interlocked.h" +#include "c_pal/timed_test_suite.h" + #include "umock_c/umock_c_ENABLE_MOCKS.h" // ============================== ENABLE_MOCKS #include "c_pal/ps_util.h" @@ -33,4 +35,4 @@ BOOL WINAPI DllMain_under_test(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved); -#endif // THREAD_NOTIFICATIONS_LACKEY_DLL_UT_PCH_H +#endif // THREAD_NOTIFICATIONS_LACKEY_DLL_UT_PCH_H \ No newline at end of file From fbaeae15482fffd9a447db78294cfc7a494b0544 Mon Sep 17 00:00:00 2001 From: Parth Aggarwal Date: Tue, 3 Mar 2026 17:40:08 -0800 Subject: [PATCH 2/2] Add c_pal to ADDITIONAL_LIBS in test CMakeLists.txt Tests using TIMED_TEST_SUITE_INITIALIZE need to link against c_pal for the process_watchdog_init/deinit implementations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- samples/async_op_samples_int/CMakeLists.txt | 2 +- tests/async_op_int/CMakeLists.txt | 2 +- tests/async_retry_wrapper_ut/CMakeLists.txt | 4 ++-- tests/async_type_helper_copy_value_handler_ut/CMakeLists.txt | 4 ++-- tests/async_type_helper_ref_counted_handler_ut/CMakeLists.txt | 4 ++-- tests/async_type_helper_thandle_handler_ut/CMakeLists.txt | 4 ++-- tests/async_type_helper_ut/CMakeLists.txt | 4 ++-- tests/constbuffer_array_int/CMakeLists.txt | 2 +- tests/constbuffer_array_splitter_ut/CMakeLists.txt | 4 ++-- tests/constbuffer_thandle_int/CMakeLists.txt | 2 +- tests/doublylinkedlist_ut/CMakeLists.txt | 4 ++-- tests/external_command_helper_ut/CMakeLists.txt | 4 ++-- tests/filename_helper_ut/CMakeLists.txt | 4 ++-- tests/flags_to_string_ut/CMakeLists.txt | 4 ++-- tests/for_each_in_folder_ut/CMakeLists.txt | 4 ++-- tests/for_each_in_sub_folder_ut/CMakeLists.txt | 4 ++-- tests/hash_ut/CMakeLists.txt | 4 ++-- tests/object_lifetime_tracker_ut/CMakeLists.txt | 4 ++-- tests/sync_wrapper_ut/CMakeLists.txt | 4 ++-- tests/tp_worker_thread_int/CMakeLists.txt | 2 +- tests/tp_worker_thread_ut/CMakeLists.txt | 4 ++-- tests/watchdog_threadpool_ut/CMakeLists.txt | 4 ++-- tests/watchdog_ut/CMakeLists.txt | 4 ++-- tests/worker_thread_int/CMakeLists.txt | 2 +- tests/worker_thread_ut/CMakeLists.txt | 4 ++-- .../tests/thread_notifications_lackey_dll_int/CMakeLists.txt | 2 +- 26 files changed, 45 insertions(+), 45 deletions(-) diff --git a/samples/async_op_samples_int/CMakeLists.txt b/samples/async_op_samples_int/CMakeLists.txt index 7caf66c0..3f15c3e1 100644 --- a/samples/async_op_samples_int/CMakeLists.txt +++ b/samples/async_op_samples_int/CMakeLists.txt @@ -28,4 +28,4 @@ set(${theseTestsName}_h_files ml_async_op_module_with_retries.h ) -build_test_artifacts(${theseTestsName} "samples" ADDITIONAL_LIBS c_util) +build_test_artifacts(${theseTestsName} "samples" ADDITIONAL_LIBS c_pal c_util) diff --git a/tests/async_op_int/CMakeLists.txt b/tests/async_op_int/CMakeLists.txt index d1e64a6f..da79dbee 100644 --- a/tests/async_op_int/CMakeLists.txt +++ b/tests/async_op_int/CMakeLists.txt @@ -13,4 +13,4 @@ set(${theseTestsName}_c_files set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_util) +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_util) diff --git a/tests/async_retry_wrapper_ut/CMakeLists.txt b/tests/async_retry_wrapper_ut/CMakeLists.txt index 54814fd1..4df976bb 100644 --- a/tests/async_retry_wrapper_ut/CMakeLists.txt +++ b/tests/async_retry_wrapper_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName async_retry_wrapper_ut) @@ -25,6 +25,6 @@ set(${theseTestsName}_h_files include_directories(../../inc) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_util c_pal_reals + ADDITIONAL_LIBS c_pal c_util c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_retry_wrapper_ut_pch.h" ) \ No newline at end of file diff --git a/tests/async_type_helper_copy_value_handler_ut/CMakeLists.txt b/tests/async_type_helper_copy_value_handler_ut/CMakeLists.txt index a0297034..de8052fd 100644 --- a/tests/async_type_helper_copy_value_handler_ut/CMakeLists.txt +++ b/tests/async_type_helper_copy_value_handler_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName async_type_helper_copy_value_handler_ut) @@ -14,6 +14,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_util c_pal_reals + ADDITIONAL_LIBS c_pal c_util c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_type_helper_copy_value_handler_ut_pch.h" ) \ No newline at end of file diff --git a/tests/async_type_helper_ref_counted_handler_ut/CMakeLists.txt b/tests/async_type_helper_ref_counted_handler_ut/CMakeLists.txt index 88f15e2c..009a1ba9 100644 --- a/tests/async_type_helper_ref_counted_handler_ut/CMakeLists.txt +++ b/tests/async_type_helper_ref_counted_handler_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName async_type_helper_ref_counted_handler_ut) @@ -16,6 +16,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_util c_pal_reals + ADDITIONAL_LIBS c_pal c_util c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_type_helper_ref_counted_handler_ut_pch.h" ) \ No newline at end of file diff --git a/tests/async_type_helper_thandle_handler_ut/CMakeLists.txt b/tests/async_type_helper_thandle_handler_ut/CMakeLists.txt index 8a2c64d8..38e42e02 100644 --- a/tests/async_type_helper_thandle_handler_ut/CMakeLists.txt +++ b/tests/async_type_helper_thandle_handler_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName async_type_helper_thandle_handler_ut) @@ -16,6 +16,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_util c_pal_reals + ADDITIONAL_LIBS c_pal c_util c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_type_helper_thandle_handler_ut_pch.h" ) \ No newline at end of file diff --git a/tests/async_type_helper_ut/CMakeLists.txt b/tests/async_type_helper_ut/CMakeLists.txt index 8790965c..d098aee7 100644 --- a/tests/async_type_helper_ut/CMakeLists.txt +++ b/tests/async_type_helper_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName async_type_helper_ut) @@ -15,6 +15,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_util c_pal_reals c_util_reals + ADDITIONAL_LIBS c_pal c_util c_pal_reals c_util_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/async_type_helper_ut_pch.h" ) \ No newline at end of file diff --git a/tests/constbuffer_array_int/CMakeLists.txt b/tests/constbuffer_array_int/CMakeLists.txt index 768f867b..9112f826 100644 --- a/tests/constbuffer_array_int/CMakeLists.txt +++ b/tests/constbuffer_array_int/CMakeLists.txt @@ -13,4 +13,4 @@ set(${theseTestsName}_c_files set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_util) \ No newline at end of file +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_util) \ No newline at end of file diff --git a/tests/constbuffer_array_splitter_ut/CMakeLists.txt b/tests/constbuffer_array_splitter_ut/CMakeLists.txt index f8c3fba0..81dc8441 100644 --- a/tests/constbuffer_array_splitter_ut/CMakeLists.txt +++ b/tests/constbuffer_array_splitter_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName constbuffer_array_splitter_ut) @@ -15,6 +15,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_util_reals + ADDITIONAL_LIBS c_pal c_util_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/constbuffer_array_splitter_ut_pch.h" ) \ No newline at end of file diff --git a/tests/constbuffer_thandle_int/CMakeLists.txt b/tests/constbuffer_thandle_int/CMakeLists.txt index 96d20b09..d6f01b79 100644 --- a/tests/constbuffer_thandle_int/CMakeLists.txt +++ b/tests/constbuffer_thandle_int/CMakeLists.txt @@ -13,4 +13,4 @@ set(${theseTestsName}_c_files set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_util) +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_util) diff --git a/tests/doublylinkedlist_ut/CMakeLists.txt b/tests/doublylinkedlist_ut/CMakeLists.txt index 3155bcd9..d1dd06d4 100644 --- a/tests/doublylinkedlist_ut/CMakeLists.txt +++ b/tests/doublylinkedlist_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName doublylinkedlist_ut) @@ -14,6 +14,6 @@ set(${theseTestsName}_c_files set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/doublylinkedlist_ut_pch.h" ) \ No newline at end of file diff --git a/tests/external_command_helper_ut/CMakeLists.txt b/tests/external_command_helper_ut/CMakeLists.txt index 53e715eb..23fa0136 100644 --- a/tests/external_command_helper_ut/CMakeLists.txt +++ b/tests/external_command_helper_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName external_command_helper_ut) @@ -16,6 +16,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_pal_reals c_util_reals + ADDITIONAL_LIBS c_pal c_pal_reals c_util_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/external_command_helper_ut_pch.h" ) \ No newline at end of file diff --git a/tests/filename_helper_ut/CMakeLists.txt b/tests/filename_helper_ut/CMakeLists.txt index c533b8f6..80df5d81 100644 --- a/tests/filename_helper_ut/CMakeLists.txt +++ b/tests/filename_helper_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName filename_helper_ut) @@ -14,6 +14,6 @@ set(${theseTestsName}_h_files ../../inc/c_util/filename_helper.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/filename_helper_ut_pch.h" ) \ No newline at end of file diff --git a/tests/flags_to_string_ut/CMakeLists.txt b/tests/flags_to_string_ut/CMakeLists.txt index e8dce123..925ffa4c 100644 --- a/tests/flags_to_string_ut/CMakeLists.txt +++ b/tests/flags_to_string_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName flags_to_string_ut) @@ -15,6 +15,6 @@ set(${theseTestsName}_h_files flags_to_string_helper.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_util_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_util_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/flags_to_string_ut_pch.h" ) \ No newline at end of file diff --git a/tests/for_each_in_folder_ut/CMakeLists.txt b/tests/for_each_in_folder_ut/CMakeLists.txt index a3696660..9a51dd7d 100644 --- a/tests/for_each_in_folder_ut/CMakeLists.txt +++ b/tests/for_each_in_folder_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName for_each_in_folder_ut) @@ -16,6 +16,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_pal_reals c_util_reals + ADDITIONAL_LIBS c_pal c_pal_reals c_util_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/for_each_in_folder_ut_pch.h" ) \ No newline at end of file diff --git a/tests/for_each_in_sub_folder_ut/CMakeLists.txt b/tests/for_each_in_sub_folder_ut/CMakeLists.txt index 695b2a6c..1889a7cd 100644 --- a/tests/for_each_in_sub_folder_ut/CMakeLists.txt +++ b/tests/for_each_in_sub_folder_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName for_each_in_sub_folder_ut) @@ -16,6 +16,6 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_pal_reals c_util_reals + ADDITIONAL_LIBS c_pal c_pal_reals c_util_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/for_each_in_sub_folder_ut_pch.h" ) \ No newline at end of file diff --git a/tests/hash_ut/CMakeLists.txt b/tests/hash_ut/CMakeLists.txt index c7bf3095..0bdee8fd 100644 --- a/tests/hash_ut/CMakeLists.txt +++ b/tests/hash_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName hash_ut) @@ -16,6 +16,6 @@ set(${theseTestsName}_h_files ../../deps/smhasher/src/MurmurHash2.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_util +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_util ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/hash_ut_pch.h" ) \ No newline at end of file diff --git a/tests/object_lifetime_tracker_ut/CMakeLists.txt b/tests/object_lifetime_tracker_ut/CMakeLists.txt index 9bc26846..affe3a66 100644 --- a/tests/object_lifetime_tracker_ut/CMakeLists.txt +++ b/tests/object_lifetime_tracker_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName object_lifetime_tracker_ut) @@ -14,6 +14,6 @@ set(${theseTestsName}_h_files ../../inc/c_util/object_lifetime_tracker.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_util_reals c_pal_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_util_reals c_pal_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/object_lifetime_tracker_ut_pch.h" ) \ No newline at end of file diff --git a/tests/sync_wrapper_ut/CMakeLists.txt b/tests/sync_wrapper_ut/CMakeLists.txt index 6c4543e4..c9fdf0b7 100644 --- a/tests/sync_wrapper_ut/CMakeLists.txt +++ b/tests/sync_wrapper_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName sync_wrapper_ut) @@ -19,6 +19,6 @@ set(${theseTestsName}_h_files test_ref_counted.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal_reals c_util_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_pal_reals c_util_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/sync_wrapper_ut_pch.h" ) \ No newline at end of file diff --git a/tests/tp_worker_thread_int/CMakeLists.txt b/tests/tp_worker_thread_int/CMakeLists.txt index 22e25133..89f876ba 100644 --- a/tests/tp_worker_thread_int/CMakeLists.txt +++ b/tests/tp_worker_thread_int/CMakeLists.txt @@ -16,4 +16,4 @@ set(${theseTestsName}_cpp_files set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_util c_util_test_helpers) +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_util c_util_test_helpers) diff --git a/tests/tp_worker_thread_ut/CMakeLists.txt b/tests/tp_worker_thread_ut/CMakeLists.txt index 2836d982..6da4404f 100644 --- a/tests/tp_worker_thread_ut/CMakeLists.txt +++ b/tests/tp_worker_thread_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName tp_worker_thread_ut) @@ -15,7 +15,7 @@ set(${theseTestsName}_h_files ) build_test_artifacts(${theseTestsName} "tests/c_util" - ADDITIONAL_LIBS c_util_reals c_util_test_helpers c_pal_reals c_pal_umocktypes + ADDITIONAL_LIBS c_pal c_util_reals c_util_test_helpers c_pal_reals c_pal_umocktypes ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/tp_worker_thread_ut_pch.h" ) \ No newline at end of file diff --git a/tests/watchdog_threadpool_ut/CMakeLists.txt b/tests/watchdog_threadpool_ut/CMakeLists.txt index ede4654d..5474af25 100644 --- a/tests/watchdog_threadpool_ut/CMakeLists.txt +++ b/tests/watchdog_threadpool_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName watchdog_threadpool_ut) @@ -14,6 +14,6 @@ set(${theseTestsName}_h_files ../../inc/c_util/watchdog_threadpool.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal_reals c_util_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_pal_reals c_util_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/watchdog_threadpool_ut_pch.h" ) \ No newline at end of file diff --git a/tests/watchdog_ut/CMakeLists.txt b/tests/watchdog_ut/CMakeLists.txt index eec5cb15..5c785110 100644 --- a/tests/watchdog_ut/CMakeLists.txt +++ b/tests/watchdog_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. set(theseTestsName watchdog_ut) @@ -14,6 +14,6 @@ set(${theseTestsName}_h_files ../../inc/c_util/watchdog.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal_reals c_util_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_pal_reals c_util_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/watchdog_ut_pch.h" ) \ No newline at end of file diff --git a/tests/worker_thread_int/CMakeLists.txt b/tests/worker_thread_int/CMakeLists.txt index 071e2b02..68c9ba16 100644 --- a/tests/worker_thread_int/CMakeLists.txt +++ b/tests/worker_thread_int/CMakeLists.txt @@ -14,7 +14,7 @@ set(${theseTestsName}_h_files ../../inc/c_util/worker_thread.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_util) +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal c_util) if (WIN32) if("${building}" STREQUAL "exe") diff --git a/tests/worker_thread_ut/CMakeLists.txt b/tests/worker_thread_ut/CMakeLists.txt index e32bca59..2529cd7d 100644 --- a/tests/worker_thread_ut/CMakeLists.txt +++ b/tests/worker_thread_ut/CMakeLists.txt @@ -1,4 +1,4 @@ -#Copyright (c) Microsoft. All rights reserved. +#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(theseTestsName worker_thread_ut) @@ -15,7 +15,7 @@ set(${theseTestsName}_h_files ../../inc/c_util/worker_thread.h ) -build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS pal_interfaces c_pal_reals c_pal_reals c_util_reals +build_test_artifacts(${theseTestsName} "tests/c_util" ADDITIONAL_LIBS c_pal pal_interfaces c_pal_reals c_pal_reals c_util_reals ENABLE_TEST_FILES_PRECOMPILED_HEADERS "${CMAKE_CURRENT_LIST_DIR}/worker_thread_ut_pch.h" ) diff --git a/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_int/CMakeLists.txt b/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_int/CMakeLists.txt index a98453dc..2194f4af 100644 --- a/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_int/CMakeLists.txt +++ b/thread_notifications_lackey_dll/tests/thread_notifications_lackey_dll_int/CMakeLists.txt @@ -12,7 +12,7 @@ set(${theseTestsName}_c_files set(${theseTestsName}_h_files ) -build_test_artifacts(${theseTestsName} "tests/thread_notifications_lackey_dll" ADDITIONAL_LIBS thread_notifications_lackey_dll) +build_test_artifacts(${theseTestsName} "tests/thread_notifications_lackey_dll" ADDITIONAL_LIBS c_pal thread_notifications_lackey_dll) if("${building}" STREQUAL "exe") copy_thread_notifications_lackey_outputs(${theseTestsName}_exe_${CMAKE_PROJECT_NAME} $)