Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion extras/CatchAddTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ function(catch_discover_tests_impl)
"${_TEST_EXECUTABLE}"
)
prepare_command_fragment(_args_reporter_fragment
"${extra_args}"
${extra_args}
"${reporter_arg}"
"--order decl"
)
Expand Down
1 change: 1 addition & 0 deletions tests/TestScripts/DiscoverTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ catch_discover_tests(
TEST_PREFIX " prefix "
TEST_SUFFIX " suffix "
ADD_TAGS_AS_LABELS
EXTRA_ARGS --success --durations yes
DISCOVERY_MODE PRE_TEST
${extra_args}
)
Expand Down
9 changes: 7 additions & 2 deletions tests/TestScripts/DiscoverTests/VerifyRegistration.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,11 @@ def extract_tests_from_ctest(ctest_output) -> List[TestInfo]:
for test in tests:
test_command = test['command']
# First part of the command is the binary, second is the filter,
# third is the `--order decl` arg for faster startup.
# followed by three EXTRA_ARGS and `--order decl` for faster startup.
# If there are less, registration has failed. If there are more,
# registration has changed and the script needs updating.
assert len(test_command) == 3, test_command
assert len(test_command) == 6, test_command
assert test_command[2:] == ['--success', '--durations', 'yes', '--order decl'], test_command
test_name = test_command[1]
labels = []
for prop in test['properties']:
Expand Down Expand Up @@ -302,3 +303,7 @@ def escape_catch2_test_names(infos: List[TestInfo]):
cmake_version = get_cmake_version()
if cmake_version >= (3, 27):
check_DL_PATHS(ctest_output)

subprocess.run(['ctest', '--test-dir', build_path, '-C', 'Debug',
'-R', '^ prefix Some test suffix $',
'--output-on-failure'], check=True)