Change reporters to report filters in round-trippable format

This commit is contained in:
Martin Hořeňovský
2022-10-27 20:43:00 +02:00
parent d2294ad9b6
commit d41da10c54
21 changed files with 31 additions and 24 deletions

View File

@@ -611,9 +611,15 @@ foreach (reporterName # "Automake" - the simple .trs format does not support any
$<TARGET_FILE:SelfTest> [comparisons][string-case] "CaseInsensitiveLess is case insensitive"
--reporter ${reporterName}
)
# Different regex for these two reporters, because the commas end up xml-escaped
if (reporterName MATCHES "JUnit|XML")
set(testCaseNameFormat "&quot;CaseInsensitiveLess is case insensitive&quot;")
else()
set(testCaseNameFormat "\"CaseInsensitiveLess is case insensitive\"")
endif()
set_tests_properties("Reporters:Filters:${reporterName}"
PROPERTIES
PASS_REGULAR_EXPRESSION "[fF]ilters.+\\[comparisons\\]\\[string-case\\]"
PASS_REGULAR_EXPRESSION "[fF]ilters.+\\[comparisons\\] \\[string-case\\] ${testCaseNameFormat}"
)
add_test(NAME "Reporters:RngSeed:${reporterName}"