diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-01-03 11:41:47 -0500 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-01-03 11:41:47 -0500 |
| commit | 272231cf29b8ce348d53b6950247fd7faec2d372 (patch) | |
| tree | 2ce7f666a97ed50c08b1cc525dec8a5a5ce95939 | |
| parent | b840c9737effa4b9c5e6550efab468c53e86cf11 (diff) | |
| download | stasis-272231cf29b8ce348d53b6950247fd7faec2d372.tar.gz | |
Add TESTS_VERBOSE cmake option
* Defines STASIS_TEST_VERBOSE
| -rw-r--r-- | CMakeLists.txt | 10 | ||||
| -rw-r--r-- | tests/CMakeLists.txt | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f5dfa9..074c2ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,12 +54,22 @@ message(CHECK_START "Run unit tests") if (TESTS) message(CHECK_PASS "yes") enable_testing() + + message(CHECK_START "Verbose test output") + option(TESTS_VERBOSE OFF) + if (TESTS_VERBOSE) + message(CHECK_PASS "yes") + else() + message(CHECK_PASS "no") + endif() + message(CHECK_START "Run regression tests") if (TESTS_RT) message(CHECK_PASS "yes") else() message(CHECK_PASS "no") endif() + add_subdirectory(tests) else() message(CHECK_PASS "no") diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 2b09e9e..08ef833 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -30,6 +30,9 @@ foreach(source_file ${source_files}) elseif (CMAKE_C_COMPILER_ID STREQUAL "MSVC") target_compile_options(${test_executable} PRIVATE ${win_cflags} ${win_msvc_cflags}) endif() + if (TESTS_VERBOSE) + target_compile_definitions(${test_executable} PRIVATE STASIS_TEST_VERBOSE=1) + endif () target_include_directories(${test_executable} PRIVATE ${core_INCLUDE} ${delivery_INCLUDE} |
