Run tests in the order they are declared in the source file. (#3451)

Fixes an issue with running tests in random order in Catch2 3.9.0+.
This commit is contained in:
Vitaly
2025-08-07 22:38:29 +02:00
committed by GitHub
parent 9ecdf5c8a1
commit 3edc8036db

View File

@@ -75,7 +75,7 @@ function(spdlog_prepare_test test_target spdlog_lib)
elseif(SPDLOG_SANITIZE_THREAD)
spdlog_enable_thread_sanitizer(${test_target})
endif()
add_test(NAME ${test_target} COMMAND ${test_target})
add_test(NAME ${test_target} COMMAND ${test_target} --order decl)
set_tests_properties(${test_target} PROPERTIES RUN_SERIAL ON)
endfunction()