diff options
| author | Martin Hořeňovský | 2021-12-13 15:15:23 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2021-12-18 20:50:00 +0100 |
| commit | 9f2dca5384a6a8f9f37a7dc2d998cac616545592 (patch) | |
| tree | 181d46f4eb905903e08af58a8a35108f87a24505 /tests/SelfTest | |
| parent | 602e484f027ccdfb59cfde852e20283ad1635f81 (diff) | |
| download | catch3-9f2dca5384a6a8f9f37a7dc2d998cac616545592.tar.gz | |
Exit with non-0 return code if no tests were run
A new flag, `--allow-running-no-tests` was added to override this
behaviour if exit code of 0 was desired.
This change also made `-w NoTests` obsolete, and so it has been
removed.
Diffstat (limited to 'tests/SelfTest')
| -rw-r--r-- | tests/SelfTest/WarnAboutNoTests.cmake | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/tests/SelfTest/WarnAboutNoTests.cmake b/tests/SelfTest/WarnAboutNoTests.cmake deleted file mode 100644 index 4637e3f3..00000000 --- a/tests/SelfTest/WarnAboutNoTests.cmake +++ /dev/null @@ -1,19 +0,0 @@ -# Workaround for a peculiarity where CTest disregards the return code from a -# test command if a PASS_REGULAR_EXPRESSION is also set -execute_process( - COMMAND ${CMAKE_ARGV3} -w NoTests "___nonexistent_test___" - RESULT_VARIABLE ret - OUTPUT_VARIABLE out -) - -message("${out}") - -if(NOT ${ret} MATCHES "^[0-9]+$") - message(FATAL_ERROR "${ret}") -endif() - -if(${ret} EQUAL 0) - message(FATAL_ERROR "Expected nonzero return code") -elseif(${out} MATCHES "Helper failed with") - message(FATAL_ERROR "Helper failed") -endif() |