Copilot commented on code in PR #12593:
URL: https://github.com/apache/trafficserver/pull/12593#discussion_r4519338618


##########
src/proxy/http/remap/unit-tests/CMakeLists.txt:
##########
@@ -324,3 +324,25 @@ target_link_libraries(
 )
 
 add_catch2_test(NAME test_RemapRulesYaml COMMAND 
$<TARGET_FILE:test_RemapRulesYaml>)
+
+### test_StrategyApi 
########################################################################
+add_executable(test_StrategyApi test_StrategyApi.cc)
+
+target_compile_definitions(test_StrategyApi PRIVATE 
TS_SRC_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}\")
+
+# tsapi_objects rather than the shared tsapi, which fails to load on macOS 
(ET_UDP).
+target_link_libraries(
+  test_StrategyApi
+  PRIVATE Catch2::Catch2WithMain
+          tsapi_objects

Review Comment:
   `tsapi_objects` contains all of `InkAPI.cc`, which references the definition 
of `ts::Overridable_Txn_Vars` in `src/shared/overridable_txn_vars.cc` (see 
`src/api/InkAPI.cc:8309`). This new executable does not link 
`ts::overridable_txn_vars`, and none of its listed transitive libraries provide 
that target (`ts::jsonrpc_protocol` is unrelated), so the test target will fail 
to link with an unresolved symbol. Add the shared target to this test's link 
dependencies, as `test_api` does in `src/api/CMakeLists.txt:81`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to