Changeset: fe091e6eec31 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/fe091e6eec31
Modified Files:
        cmake/monetdb-functions.cmake
        ctest/cmake/detect-getaddrinfo.cmake
        ctest/cmake/detect-pthreadh.cmake
        ctest/cmake/detect-pthreadinit.cmake
        ctest/cmake/detect-pthreadkill.cmake
        ctest/cmake/detect-pthreadsig.cmake
        ctest/cmake/detect-unixgetaddrinfo.cmake
        ctest/cmake/detect-wingetaddrinfo.cmake
        ctest/monetdb5/mal/CMakeLists.txt
        ctest/tools/monetdbe/CMakeLists.txt
Branch: Dec2025
Log Message:

Use add_test in recommended way.


diffs (219 lines):

diff --git a/cmake/monetdb-functions.cmake b/cmake/monetdb-functions.cmake
--- a/cmake/monetdb-functions.cmake
+++ b/cmake/monetdb-functions.cmake
@@ -142,7 +142,7 @@ function(assert_variable_exists assert_v
   target_sources("test_${assert_variable_variablename}_var"
     PRIVATE
     "${CMAKE_CURRENT_BINARY_DIR}/test_${assert_variable_variablename}_var.c")
-  add_test("testDetect${assert_variable_variablename}" 
"test_${assert_variable_variablename}_var")
+  add_test(NAME "testDetect${assert_variable_variablename}" COMMAND 
"test_${assert_variable_variablename}_var")
 endfunction()
 
 # CMake function to test if a cmake variable has a corresponding
@@ -171,8 +171,8 @@ function(assert_legacy_variable_exists)
   
target_link_libraries("test_${assert_variable_legacy_variablename}_legacy_var"
   PRIVATE
   monetdb_config_header)
-  add_test("testDetect${assert_variable_legacy_variablename}Legacy"
-    "test_${assert_variable_legacy_variablename}_legacy_var")
+  add_test(NAME "testDetect${assert_variable_legacy_variablename}Legacy"
+    COMMAND "test_${assert_variable_legacy_variablename}_legacy_var")
 endfunction()
 
 # CMake function to test if the package detection gave the
@@ -201,8 +201,8 @@ function(assert_package_detected)
   target_link_libraries("test_${assert_package_variablename}_detect_var"
   PRIVATE
   monetdb_config_header)
-  add_test("testDetect${assert_package_variablename}Detect"
-    "test_${assert_package_variablename}_detect_var")
+  add_test(NAME "testDetect${assert_package_variablename}Detect"
+    COMMAND "test_${assert_package_variablename}_detect_var")
 endfunction()
 
 function(find_selinux_types)
diff --git a/ctest/cmake/detect-getaddrinfo.cmake 
b/ctest/cmake/detect-getaddrinfo.cmake
--- a/ctest/cmake/detect-getaddrinfo.cmake
+++ b/ctest/cmake/detect-getaddrinfo.cmake
@@ -47,4 +47,4 @@ target_sources(test_detect_getaddrinfo
 target_link_libraries(test_detect_getaddrinfo
   PRIVATE
   monetdb_config_header)
-add_test(testDetectGetaddrinfo test_detect_getaddrinfo)
+add_test(NAME testDetectGetaddrinfo COMMAND test_detect_getaddrinfo)
diff --git a/ctest/cmake/detect-pthreadh.cmake 
b/ctest/cmake/detect-pthreadh.cmake
--- a/ctest/cmake/detect-pthreadh.cmake
+++ b/ctest/cmake/detect-pthreadh.cmake
@@ -47,4 +47,4 @@ target_sources(test_detect_pthreadh
 target_link_libraries(test_detect_pthreadh
   PRIVATE
   monetdb_config_header)
-add_test(testDetectPthreadh test_detect_pthreadh)
+add_test(NAME testDetectPthreadh COMMAND test_detect_pthreadh)
diff --git a/ctest/cmake/detect-pthreadinit.cmake 
b/ctest/cmake/detect-pthreadinit.cmake
--- a/ctest/cmake/detect-pthreadinit.cmake
+++ b/ctest/cmake/detect-pthreadinit.cmake
@@ -47,4 +47,4 @@ target_sources(test_detect_pthreadinit
 target_link_libraries(test_detect_pthreadinit
   PRIVATE
   monetdb_config_header)
-add_test(testDetectPthreadinit test_detect_pthreadinit)
+add_test(NAME testDetectPthreadinit COMMAND test_detect_pthreadinit)
diff --git a/ctest/cmake/detect-pthreadkill.cmake 
b/ctest/cmake/detect-pthreadkill.cmake
--- a/ctest/cmake/detect-pthreadkill.cmake
+++ b/ctest/cmake/detect-pthreadkill.cmake
@@ -47,4 +47,4 @@ target_sources(test_detect_pthreadkill
 target_link_libraries(test_detect_pthreadkill
   PRIVATE
   monetdb_config_header)
-add_test(testDetectPthreadkill test_detect_pthreadkill)
+add_test(NAME testDetectPthreadkill COMMAND test_detect_pthreadkill)
diff --git a/ctest/cmake/detect-pthreadsig.cmake 
b/ctest/cmake/detect-pthreadsig.cmake
--- a/ctest/cmake/detect-pthreadsig.cmake
+++ b/ctest/cmake/detect-pthreadsig.cmake
@@ -47,4 +47,4 @@ target_sources(test_detect_pthreadsig
 target_link_libraries(test_detect_pthreadsig
   PRIVATE
   monetdb_config_header)
-add_test(testDetectPthreadsig test_detect_pthreadsig)
+add_test(NAME testDetectPthreadsig COMMAND test_detect_pthreadsig)
diff --git a/ctest/cmake/detect-unixgetaddrinfo.cmake 
b/ctest/cmake/detect-unixgetaddrinfo.cmake
--- a/ctest/cmake/detect-unixgetaddrinfo.cmake
+++ b/ctest/cmake/detect-unixgetaddrinfo.cmake
@@ -44,4 +44,4 @@ add_executable(test_detect_unixgetaddrin
 target_sources(test_detect_unixgetaddrinfo
   PRIVATE
   ${CMAKE_CURRENT_BINARY_DIR}/test_detect_unixgetaddrinfo.c)
-add_test(testDetectUnixgetaddrinfo test_detect_unixgetaddrinfo)
+add_test(NAME testDetectUnixgetaddrinfo COMMAND test_detect_unixgetaddrinfo)
diff --git a/ctest/cmake/detect-wingetaddrinfo.cmake 
b/ctest/cmake/detect-wingetaddrinfo.cmake
--- a/ctest/cmake/detect-wingetaddrinfo.cmake
+++ b/ctest/cmake/detect-wingetaddrinfo.cmake
@@ -44,4 +44,4 @@ add_executable(test_detect_wingetaddrinf
 target_sources(test_detect_wingetaddrinfo
   PRIVATE
   ${CMAKE_CURRENT_BINARY_DIR}/test_detect_wingetaddrinfo.c)
-add_test(testDetectWingetaddrinfo test_detect_wingetaddrinfo)
+add_test(NAME testDetectWingetaddrinfo COMMAND test_detect_wingetaddrinfo)
diff --git a/ctest/monetdb5/mal/CMakeLists.txt 
b/ctest/monetdb5/mal/CMakeLists.txt
--- a/ctest/monetdb5/mal/CMakeLists.txt
+++ b/ctest/monetdb5/mal/CMakeLists.txt
@@ -19,7 +19,7 @@ target_link_libraries(test_malEmbeddedBo
   ${CMAKE_DL_LIBS}
   Threads::Threads)
 target_compile_definitions(test_malEmbeddedBoot PRIVATE LIBMONETDB5)
-add_test(malEmbeddedBoot test_malEmbeddedBoot)
+add_test(NAME malEmbeddedBoot COMMAND test_malEmbeddedBoot)
 
 add_executable(test_malInclude test_malInclude.c)
 target_link_libraries(test_malInclude
@@ -32,4 +32,4 @@ target_link_libraries(test_malInclude
   ${CMAKE_DL_LIBS}
   Threads::Threads)
 target_compile_definitions(test_malInclude PRIVATE LIBMONETDB5)
-add_test(malInclude test_malInclude)
+add_test(NAME malInclude COMMAND test_malInclude)
diff --git a/ctest/tools/monetdbe/CMakeLists.txt 
b/ctest/tools/monetdbe/CMakeLists.txt
--- a/ctest/tools/monetdbe/CMakeLists.txt
+++ b/ctest/tools/monetdbe/CMakeLists.txt
@@ -14,49 +14,49 @@ if(NOT MONETDB_STATIC)
     PRIVATE
     monetdb_config_header
     monetdbe)
-  add_test(run_example1 example1)
+  add_test(NAME run_example1 COMMAND example1)
 
   add_executable(example2 example2.c)
   target_link_libraries(example2
     PRIVATE
     monetdb_config_header
     monetdbe)
-  add_test(run_example2 example2)
+  add_test(NAME run_example2 COMMAND example2)
 
   add_executable(example_temporal example_temporal.c)
   target_link_libraries(example_temporal
     PRIVATE
     monetdb_config_header
     monetdbe)
-  add_test(run_example_temporal example_temporal)
+  add_test(NAME run_example_temporal COMMAND example_temporal)
 
   add_executable(example_decimals example_decimals.c)
   target_link_libraries(example_decimals
     PRIVATE
     monetdb_config_header
     monetdbe)
-  add_test(run_example_decimals example_decimals)
+  add_test(NAME run_example_decimals COMMAND example_decimals)
 
   add_executable(example_blob example_blob.c)
   target_link_libraries(example_blob
     PRIVATE
     monetdb_config_header
     monetdbe)
-  add_test(run_example_blob example_blob)
+  add_test(NAME run_example_blob COMMAND example_blob)
 
   add_executable(example_append example_append.c)
   target_link_libraries(example_append
     PRIVATE
     monetdb_config_header
     monetdbe)
-  add_test(run_example_append example_append)
+  add_test(NAME run_example_append COMMAND example_append)
 
   add_executable(example_append_raw example_append_raw.c)
   target_link_libraries(example_append_raw
     PRIVATE
     monetdb_config_header
     monetdbe)
-  add_test(run_example_append_raw example_append_raw)
+  add_test(NAME run_example_append_raw COMMAND example_append_raw)
 
   if(NOT WIN32)
     add_executable(example_backup example_backup.c)
@@ -64,7 +64,7 @@ if(NOT MONETDB_STATIC)
       PRIVATE
       monetdb_config_header
       monetdbe)
-    add_test(run_example_backup example_backup)
+    add_test(NAME run_example_backup COMMAND example_backup)
   endif()
 
   if(NOT WIN32)
@@ -73,7 +73,7 @@ if(NOT MONETDB_STATIC)
       PRIVATE
       monetdb_config_header
       monetdbe)
-    add_test(run_example_copy example_copy)
+    add_test(NAME run_example_copy COMMAND example_copy)
   endif()
 
   add_executable(example_connections example_connections.c)
@@ -81,14 +81,14 @@ if(NOT MONETDB_STATIC)
     PRIVATE
     monetdb_config_header
     monetdbe)
-  add_test(run_example_connections example_connections)
+  add_test(NAME run_example_connections COMMAND example_connections)
 
   add_executable(example_sessions example_sessions.c)
   target_link_libraries(example_sessions
     PRIVATE
     monetdb_config_header
     monetdbe)
-  add_test(run_example_sessions example_sessions)
+  add_test(NAME run_example_sessions COMMAND example_sessions)
 
   if(WITH_CMOCKA)
     add_executable(cmocka_test cmocka_test.c test_helper.c)
@@ -99,7 +99,7 @@ if(NOT MONETDB_STATIC)
       monetdbe
       "${CMOCKA_LIBRARY}"
     )
-    add_test(run_cmocka_test cmocka_test)
+    add_test(NAME run_cmocka_test COMMAND cmocka_test)
   endif()
 
   if (TESTING)
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to