mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-03 05:45:39 +02:00
Always report rng seed from builtin reporters
Not all reporters use a format that supports this, so TeamCity and Automake reporters still do not report it. The console reporter now reports it even on successful runs, where before it only reported the rng seed in the header, which was showed either for failed run, or for run with `-s`. CLoses #2065
This commit is contained in:
@@ -523,5 +523,27 @@ if (CATCH_ENABLE_CONFIGURE_TESTS)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
foreach (reporterName # "Automake" - the simple .trs format does not support any kind of comments/metadata
|
||||
"compact"
|
||||
"console"
|
||||
"JUnit"
|
||||
"SonarQube"
|
||||
"TAP"
|
||||
# "TeamCity" - does not seem to support test suite-level metadata/comments
|
||||
"XML")
|
||||
add_test(NAME "Reporters:RngSeed:${reporterName}"
|
||||
COMMAND
|
||||
$<TARGET_FILE:SelfTest> "Factorials are computed"
|
||||
--reporter ${reporterName}
|
||||
--rng-seed 18181818
|
||||
)
|
||||
set_tests_properties("Reporters:RngSeed:${reporterName}"
|
||||
PROPERTIES
|
||||
PASS_REGULAR_EXPRESSION "18181818"
|
||||
)
|
||||
|
||||
endforeach()
|
||||
|
||||
|
||||
list(APPEND CATCH_WARNING_TARGETS SelfTest)
|
||||
set(CATCH_WARNING_TARGETS ${CATCH_WARNING_TARGETS} PARENT_SCOPE)
|
||||
|
Reference in New Issue
Block a user