catch3
Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.
Clonegit clone https://git.progmasoft.com/catch3
Fixup catch_discover_tests
- Commit
964303706a409848b64bad5380618f19ac4f3242- Author
- Martin Hořeňovský ·
- Parents
54882dbb116a
Changes
extras/CatchAddTests.cmake | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/extras/CatchAddTests.cmake b/extras/CatchAddTests.cmake index 156d55ff..01c01386 100644 --- a/extras/CatchAddTests.cmake +++ b/extras/CatchAddTests.cmake @@ -29,16 +29,11 @@ if(NOT EXISTS "${TEST_EXECUTABLE}") ) endif() execute_process( - COMMAND ${TEST_EXECUTOR} "${TEST_EXECUTABLE}" ${spec} --list-test-names-only + COMMAND ${TEST_EXECUTOR} "${TEST_EXECUTABLE}" ${spec} --list-tests --verbosity quiet OUTPUT_VARIABLE output RESULT_VARIABLE result ) -# Catch --list-test-names-only reports the number of tests, so 0 is... surprising -if(${result} EQUAL 0) - message(WARNING - "Test executable '${TEST_EXECUTABLE}' contains no tests!\n" - ) -elseif(${result} LESS 0) +if(NOT ${result} EQUAL 0) message(FATAL_ERROR "Error running test executable '${TEST_EXECUTABLE}':\n" " Result: ${result}\n"