Commit Graph
9 Commits
Author SHA1 Message Date
Martin Hořeňovský 630840c500 Fix <target>_TESTS variable generated by catch_discover_tests
There were 2 separate bugs, one recently added and one ancient
(since roughly the first version of the registration script).

1) The recent refactoring of how the JSON output from Catch2 is
   parsed caused shadowing between the variable containing the
   per-test JSON fragments and the accumulator of test names for
   <target>_TESTS variable. This led to the variable containing
   both the names and the JSON fragments, and thus being completely
   wrong.

2) The test name accumulation has never accounted for characters
   that need escaping to be present in a CMake list. This means
   that e.g. test names with semicolon in them would end up with
   two elements in the test list.

Both of these are now fixed, at the cost of extra complexity and
my sanity as I had to learn more about CMake escaping rules.

(CMake escaping rules are dumb)
2026-08-10 00:17:26 +02:00
Martin Hořeňovský 0b4d7a5a16 JSONReporter's listTests only lists class-name if it is non-empty 2026-08-07 23:07:46 +02:00
Martin Hořeňovský 9ec44dd62b catch_discover_tests uses tempfile to retrieve JSON from the binary
This allows it to deal with badly behaved code, where 3rd party
dependencies write into stdout during global construction.

Closes #3162
Closes #3166
2026-07-04 16:36:05 +02:00
Eisuke Kawashima ceed26842b fix(python): fix invalid escape sequences 2025-06-24 15:32:27 -06:00
Martin Hořeňovský 7d7b2f89f2 Support adding test tags as CTest labels in catch_discover_tests
We also bump the minimum CMake version to 3.20 as per #2943
2025-01-05 20:02:00 +01:00
Martin Hořeňovský 3cd90c5c3b Add tests for multiple args to DL_PATHS in catch_discover_tests 2024-03-26 18:04:17 +01:00
Martin Hořeňovský e4b16053a6 Escape Catch2 test names in catch_discover_tests tests 2023-06-15 14:19:39 +02:00
Martin Hořeňovský a0c6a28460 Fix possible FP in catch_discover_tests tests 2023-06-14 23:31:41 +02:00
Martin Hořeňovský c8363143e7 Add test scaffolding for catch_discover_tests 2023-06-14 21:14:33 +02:00