Commit Graph

11 Commits

Author SHA1 Message Date
Robin Christ
42ee66b5e6
Fix handling of semicolon and backslash characters in CMake test discovery (#2676)
This PR fixes the handling of semicolon and backslash characters in test names in the CMake test discovery

Closes #2674
2023-06-14 23:40:10 +02:00
Holger Kaelberer
4e8399d835 CatchAddTests.cmake: Refactor into callable method
Move test discovery logic into new catch_discover_tests_impl method
and make CatchAddTests aware of whether it is being launched in
CMake's script mode.

When launched in script mode, catch_discover_tests_impl is called
passing arguments obtained from the definitions passed into the call
to cmake. This preserves the existing behavior assumed by Catch.cmake.

Looking ahead, it also allows CatchAddTests to be included in
generated files and call catch_discover_tests_impl to perform test
discovery at test runtime with the new PRE_TEST discovery mode
introduced later.
2023-04-19 23:51:42 +02:00
Arne Mertz
50bf00e266 Fix reporter detection in catch_discover_tests
Closes #2668
Instead of grepping for the reporter, use it in the process and check for the error code
2023-04-05 10:12:50 +02:00
mheimlich
a7dc85dd49 Use DYLD_LIBRARY_PATH on apple platforms. 2022-07-23 20:45:49 +02:00
mheimlich
a63ad74554
Added new DL_PATHS option to catch_discover_tests() (#2467)
This enables setting the required PATH/LD_LIBRARY_PATH environment variables both when retrieving the list of text cases and when executing the tests.

Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com>
2022-07-11 18:31:32 +02:00
Georg Schwab
04166514fe fixed inconsistent semicolon expansion in catch_discover_tests (Bug #2214) 2021-04-16 17:22:14 +02:00
Liam Keegan
c44d9cc718
fix warning in extras/CatchAddTests.cmake
- don't warn on zero return code of --list-reporters
  - previously return code was the number of reporters (#1410, #1146)
  - as of 2c06ee9 return code is zero on success
2020-10-08 16:44:20 +02:00
Rémy Salim
863cc6a155
Add WORKING_DIRECTORY to CatchAddTests.cmake commands 2020-10-08 11:41:35 +02:00
Martin Stump
c522e88afa
Add REPORTER and OUTPUT_* args 2020-10-08 11:35:42 +02:00
Martin Hořeňovský
964303706a
Fixup catch_discover_tests
Fixed its use of removed `--list-test-names-only` switch, and also
updated the return code check to reflect changes in v3.

Closes #1933
2020-05-20 07:14:06 +02:00
Martin Hořeňovský
918aa327fa
Rename contrib/ to extras/ 2019-12-05 16:24:57 +01:00