diff options
| author | Martin Hořeňovský | 2026-09-11 13:13:12 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2026-09-11 13:13:15 +0200 |
| commit | 6534dbc3ef3a162111830d9b5d8a9092d378336d (patch) | |
| tree | 8971c4412b3533c944e7f321cf2a02d0a786b8e4 /extras | |
| parent | b7f1a83ff0c36990a9840bcb3de56a848d24a893 (diff) | |
| download | catch3-6534dbc3ef3a162111830d9b5d8a9092d378336d.tar.gz | |
catch_discover_tests registers tests with --order decl
Catch2 defaults to random test execution order, which has to process
all tests present in the binary, even if they will be filtered down
to just 1 later. For the `SelfTest` binary, the overhead from this is
about 20% in Debug configuration and 5% in Release.
By registering the CTest tests with `--order decl`, we avoid this
overhead.
Diffstat (limited to 'extras')
| -rw-r--r-- | extras/CatchAddTests.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/extras/CatchAddTests.cmake b/extras/CatchAddTests.cmake index f4840196..aba0d001 100644 --- a/extras/CatchAddTests.cmake +++ b/extras/CatchAddTests.cmake @@ -404,8 +404,9 @@ function(catch_discover_tests_impl) "${_TEST_EXECUTABLE}" ) prepare_command_fragment(_args_reporter_fragment - ${extra_args} + "${extra_args}" "${reporter_arg}" + "--order decl" ) # `set_tests_properties` calls are |