Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions extras/CatchAddTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,13 @@ function(catch_discover_tests_impl)
math(EXPR num_tests "${num_tests} - 1")

foreach(idx RANGE ${num_tests})
string(JSON single_test GET ${test_listing} ${idx})
string(JSON test_tags GET "${single_test}" "tags")
string(JSON plain_name GET "${single_test}" "name")
if(add_tags)
string(JSON single_test GET "${test_listing}" ${idx})
string(JSON test_tags GET "${single_test}" "tags")
string(JSON plain_name GET "${single_test}" "name")
else()
string(JSON plain_name GET "${test_listing}" ${idx} "name")
endif()
Comment on lines +202 to +208

@TheStormN TheStormN Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In short if add_tags is false we do only a single round of parsing the JSON data. Unfortunately if tags are used as labels, the performance will be as before.


# Escape characters in test case names that would be parsed by Catch2
# Note that the \ escaping must happen FIRST! Do not change the order.
Expand Down