mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-01 06:37:22 +00:00
build(tests): allow to pass FALCO_TESTS_ARGUMENTS to the tests target
Signed-off-by: Lorenzo Fontana <lo@linux.com>
This commit is contained in:
@@ -18,6 +18,8 @@ set(FALCO_TESTS_SOURCES test_base.cpp engine/test_token_bucket.cpp engine/test_r
|
|||||||
|
|
||||||
set(FALCO_TESTED_LIBRARIES falco_engine)
|
set(FALCO_TESTED_LIBRARIES falco_engine)
|
||||||
|
|
||||||
|
SET(FALCO_TESTS_ARGUMENTS "" CACHE STRING "Test arguments to pass to the Falco test suite")
|
||||||
|
|
||||||
option(FALCO_BUILD_TESTS "Determines whether to build tests." ON)
|
option(FALCO_BUILD_TESTS "Determines whether to build tests." ON)
|
||||||
|
|
||||||
if(FALCO_BUILD_TESTS)
|
if(FALCO_BUILD_TESTS)
|
||||||
@@ -47,6 +49,6 @@ if(FALCO_BUILD_TESTS)
|
|||||||
include(CTest)
|
include(CTest)
|
||||||
include(Catch)
|
include(Catch)
|
||||||
catch_discover_tests(falco_test)
|
catch_discover_tests(falco_test)
|
||||||
|
separate_arguments(FALCO_TESTS_ARGUMENTS)
|
||||||
add_custom_target(tests COMMAND ${CMAKE_CTEST_COMMAND} DEPENDS falco_test)
|
add_custom_target(tests COMMAND ${CMAKE_CTEST_COMMAND} ${FALCO_TESTS_ARGUMENTS} DEPENDS falco_test)
|
||||||
endif()
|
endif()
|
||||||
|
Reference in New Issue
Block a user