CTest: integrate example as optional test (PRIVATEBIN_IT-gated) and ensure DLL copy; wire example into root CMake
This commit is contained in:
@ -25,4 +25,13 @@ target_include_directories(test_basic PRIVATE
|
||||
)
|
||||
|
||||
# Register the test with CTest
|
||||
add_test(NAME test_basic COMMAND test_basic)
|
||||
add_test(NAME test_basic COMMAND test_basic)
|
||||
|
||||
# Optional example run as a test (requires network and live server)
|
||||
# Example-Test nur aktiv, wenn PRIVATEBIN_IT=1 gesetzt ist
|
||||
add_test(NAME example_run COMMAND $<TARGET_FILE:example>)
|
||||
if(DEFINED ENV{PRIVATEBIN_IT} AND NOT "$ENV{PRIVATEBIN_IT}" STREQUAL "0")
|
||||
set_tests_properties(example_run PROPERTIES DISABLED FALSE)
|
||||
else()
|
||||
set_tests_properties(example_run PROPERTIES DISABLED TRUE)
|
||||
endif()
|
||||
Reference in New Issue
Block a user