You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by cm...@apache.org on 2024/02/07 22:13:26 UTC

(trafficserver) branch master updated: Add support for verifying plugins at test time (#11056)

This is an automated email from the ASF dual-hosted git repository.

cmcfarlen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 255dadf11e Add support for verifying plugins at test time (#11056)
255dadf11e is described below

commit 255dadf11eafca648de6deed902cfd6d5aebb5ea
Author: Chris McFarlen <ch...@mcfarlen.us>
AuthorDate: Wed Feb 7 16:13:20 2024 -0600

    Add support for verifying plugins at test time (#11056)
---
 cmake/add_atsplugin.cmake            | 12 ++++++++++++
 plugins/cache_promote/CMakeLists.txt |  2 ++
 2 files changed, 14 insertions(+)

diff --git a/cmake/add_atsplugin.cmake b/cmake/add_atsplugin.cmake
index f8619789d1..675bd8d409 100644
--- a/cmake/add_atsplugin.cmake
+++ b/cmake/add_atsplugin.cmake
@@ -25,6 +25,18 @@ function(add_atsplugin name)
   install(TARGETS ${name} DESTINATION ${CMAKE_INSTALL_LIBEXECDIR})
 endfunction()
 
+function(verify_remap_plugin target)
+  add_test(NAME verify_${target} COMMAND $<TARGET_FILE:traffic_server> -C
+                                         "verify_remap_plugin $<TARGET_FILE:${target}>"
+  )
+endfunction()
+
+function(verify_global_plugin target)
+  add_test(NAME verify_${target} COMMAND $<TARGET_FILE:traffic_server> -C
+                                         "verify_global_plugin $<TARGET_FILE:${target}>"
+  )
+endfunction()
+
 if(APPLE)
   set(CMAKE_MODULE_LINKER_FLAGS "-undefined dynamic_lookup")
 endif()
diff --git a/plugins/cache_promote/CMakeLists.txt b/plugins/cache_promote/CMakeLists.txt
index c25198f5cc..ce98ccebe4 100644
--- a/plugins/cache_promote/CMakeLists.txt
+++ b/plugins/cache_promote/CMakeLists.txt
@@ -18,3 +18,5 @@
 add_atsplugin(cache_promote cache_promote.cc configs.cc policy.cc lru_policy.cc policy_manager.cc)
 
 target_link_libraries(cache_promote PRIVATE OpenSSL::Crypto libswoc::libswoc)
+
+verify_remap_plugin(cache_promote)