From 1d43d4eb404ac5d7fb1fb9e3447f787ea60ca41a Mon Sep 17 00:00:00 2001 From: Lorenzo Fontana Date: Fri, 8 May 2020 03:43:32 +0200 Subject: [PATCH] build(tests): allow to pass FALCO_TESTS_ARGUMENTS to the tests target Signed-off-by: Lorenzo Fontana --- tests/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index b27d902e..82045983 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -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_TESTS_ARGUMENTS "" CACHE STRING "Test arguments to pass to the Falco test suite") + option(FALCO_BUILD_TESTS "Determines whether to build tests." ON) if(FALCO_BUILD_TESTS) @@ -47,6 +49,6 @@ if(FALCO_BUILD_TESTS) include(CTest) include(Catch) catch_discover_tests(falco_test) - - add_custom_target(tests COMMAND ${CMAKE_CTEST_COMMAND} DEPENDS falco_test) + separate_arguments(FALCO_TESTS_ARGUMENTS) + add_custom_target(tests COMMAND ${CMAKE_CTEST_COMMAND} ${FALCO_TESTS_ARGUMENTS} DEPENDS falco_test) endif()