From 2420ccf9a82cb4482da7a549363a227a307b7db9 Mon Sep 17 00:00:00 2001 From: Esa Korhonen Date: Wed, 1 Apr 2020 13:49:13 +0300 Subject: [PATCH] MXS-2900 Use named arguments in add_test_executable_ex() Backend setup and labels are given in separate arguments. Only the backend setup is saved to the test information array. Additional link libraries may also be defined if a group of tests want to share code. --- .../mariadbmonitor/CMakeLists.txt | 4 +- maxscale-system-test/utilities.cmake | 86 +++++++++++++++++-- 2 files changed, 82 insertions(+), 8 deletions(-) diff --git a/maxscale-system-test/mariadbmonitor/CMakeLists.txt b/maxscale-system-test/mariadbmonitor/CMakeLists.txt index 304c702aa..428088c13 100644 --- a/maxscale-system-test/mariadbmonitor/CMakeLists.txt +++ b/maxscale-system-test/mariadbmonitor/CMakeLists.txt @@ -1 +1,3 @@ -add_test_executable_ex(mysqlmon_switchover.cpp mysqlmon_switchover mysqlmon_switchover.cnf LABELS REPL_BACKEND) \ No newline at end of file +# MySQL Monitor switchover +add_test_executable_ex(NAME mysqlmon_switchover SOURCE mysqlmon_switchover.cpp CONFIG mysqlmon_switchover.cnf + VMS repl_backend LABELS switchover) diff --git a/maxscale-system-test/utilities.cmake b/maxscale-system-test/utilities.cmake index f2cee6254..5d2186c22 100644 --- a/maxscale-system-test/utilities.cmake +++ b/maxscale-system-test/utilities.cmake @@ -85,15 +85,87 @@ function(add_test_script name script template labels) add_test_properties(${name} ${labels}) endfunction() -# Same as "add_test_executable" but with a local config template file. -function(add_test_executable_ex source name config_file labels) - list(APPEND labels ${ARGN}) +# Same as "add_test_executable" but with a local config template file. Called using named arguments as in +# add_test_executable_ex(NAME SOURCE CONFIG VMS +# LABELS