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 2026/04/21 14:26:49 UTC

(trafficserver) 04/05: Guard HTTP/3 test targets with BUILD_TESTING (#13094)

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

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

commit 64f17d04300652e404dd78f8cfdfbec756c70cbc
Author: Brian Neradt <br...@gmail.com>
AuthorDate: Fri Apr 17 17:04:43 2026 -0500

    Guard HTTP/3 test targets with BUILD_TESTING (#13094)
    
    Guard add_catch2_test for h3 with BUILD_TESTING. Otherwise
    -DBUILD_TESTING=off fails when HTTP/3 builds are enabled.
    
    (cherry picked from commit 5b7ab921da845b92ad1c87eec6a3aef25eb7d1ce)
---
 src/proxy/http3/CMakeLists.txt | 74 ++++++++++++++++++++++--------------------
 1 file changed, 38 insertions(+), 36 deletions(-)

diff --git a/src/proxy/http3/CMakeLists.txt b/src/proxy/http3/CMakeLists.txt
index 4a492a862a..c4c71dba53 100644
--- a/src/proxy/http3/CMakeLists.txt
+++ b/src/proxy/http3/CMakeLists.txt
@@ -47,42 +47,44 @@ target_link_libraries(
   PRIVATE ts::proxy
 )
 
-add_executable(
-  test_http3
-  test/main.cc
-  test/stub.cc
-  test/test_Http3Frame.cc
-  test/test_Http3FrameDispatcher.cc
-  Http3ProtocolEnforcer.cc
-  Http3FrameDispatcher.cc
-  Http3DebugNames.cc
-  Http3Config.cc
-  Http3Frame.cc
-  Http3SettingsHandler.cc
-)
-target_link_libraries(
-  test_http3
-  PRIVATE Catch2::Catch2WithMain
-          ts::quic
-          ts::inkevent
-          ts::records
-          ts::tsutil
-          ts::hdrs
-          ts::tscore
-)
-add_catch2_test(NAME test_http3 COMMAND test_http3)
+if(BUILD_TESTING)
+  add_executable(
+    test_http3
+    test/main.cc
+    test/stub.cc
+    test/test_Http3Frame.cc
+    test/test_Http3FrameDispatcher.cc
+    Http3ProtocolEnforcer.cc
+    Http3FrameDispatcher.cc
+    Http3DebugNames.cc
+    Http3Config.cc
+    Http3Frame.cc
+    Http3SettingsHandler.cc
+  )
+  target_link_libraries(
+    test_http3
+    PRIVATE Catch2::Catch2WithMain
+            ts::quic
+            ts::inkevent
+            ts::records
+            ts::tsutil
+            ts::hdrs
+            ts::tscore
+  )
+  add_catch2_test(NAME test_http3 COMMAND test_http3)
 
-add_executable(test_qpack test/main_qpack.cc test/test_QPACK.cc QPACK.cc)
-target_link_libraries(
-  test_qpack
-  PRIVATE Catch2::Catch2
-          ts::quic
-          ts::inkevent
-          ts::records
-          ts::tsutil
-          ts::hdrs
-          ts::tscore
-)
-add_catch2_test(NAME test_qpack COMMAND test_qpack)
+  add_executable(test_qpack test/main_qpack.cc test/test_QPACK.cc QPACK.cc)
+  target_link_libraries(
+    test_qpack
+    PRIVATE Catch2::Catch2
+            ts::quic
+            ts::inkevent
+            ts::records
+            ts::tsutil
+            ts::hdrs
+            ts::tscore
+  )
+  add_catch2_test(NAME test_qpack COMMAND test_qpack)
+endif()
 
 clang_tidy_check(http3)