############################################################################### # gmock_marsio ############################################################################### add_library(gmock_marsio gmock_marsio.cpp) target_include_directories(gmock_marsio PUBLIC /opt/mrzcpd/include) ############################################################################### # temp_platform ############################################################################### add_library(temp_platform ${CMAKE_SOURCE_DIR}/platform/src/policy.cpp ${CMAKE_SOURCE_DIR}/platform/src/health_check.cpp ${CMAKE_SOURCE_DIR}/platform/src/sce.cpp ${CMAKE_SOURCE_DIR}/platform/src/packet_io.cpp ${CMAKE_SOURCE_DIR}/platform/src/global_metrics.cpp ${CMAKE_SOURCE_DIR}/platform/src/sf_metrics.cpp ${CMAKE_SOURCE_DIR}/platform/src/sf_status.cpp) target_include_directories(temp_platform PUBLIC ${CMAKE_SOURCE_DIR}/common/include) target_include_directories(temp_platform PUBLIC ${CMAKE_SOURCE_DIR}/platform/include) target_link_libraries(temp_platform PUBLIC common pthread cjson maatframe MESA_prof_load MESA_field_stat gmock_marsio) ############################################################################### # gtest_ctrl_pkt_opening ############################################################################### add_executable(gtest_ctrl_pkt_opening gtest_ctrl_pkt_opening.cpp) target_include_directories(gtest_ctrl_pkt_opening PUBLIC ${CMAKE_SOURCE_DIR}/common/include) target_include_directories(gtest_ctrl_pkt_opening PUBLIC ${CMAKE_SOURCE_DIR}/platform/include) target_link_libraries(gtest_ctrl_pkt_opening temp_platform gtest) ############################################################################### # gtest_ctrl_pkt_active ############################################################################### add_executable(gtest_ctrl_pkt_active gtest_ctrl_pkt_active.cpp) target_include_directories(gtest_ctrl_pkt_active PUBLIC ${CMAKE_SOURCE_DIR}/common/include) target_include_directories(gtest_ctrl_pkt_active PUBLIC ${CMAKE_SOURCE_DIR}/platform/include) target_link_libraries(gtest_ctrl_pkt_active temp_platform gtest) ############################################################################### # gtest_data_pkt_stee_bypass ############################################################################### add_executable(gtest_data_pkt_stee_bypass gtest_data_pkt_stee_bypass.cpp) target_include_directories(gtest_data_pkt_stee_bypass PUBLIC ${CMAKE_SOURCE_DIR}/common/include) target_include_directories(gtest_data_pkt_stee_bypass PUBLIC ${CMAKE_SOURCE_DIR}/platform/include) target_link_libraries(gtest_data_pkt_stee_bypass temp_platform gtest) ############################################################################### # gtest_data_pkt_stee_block ############################################################################### add_executable(gtest_data_pkt_stee_block gtest_data_pkt_stee_block.cpp) target_include_directories(gtest_data_pkt_stee_block PUBLIC ${CMAKE_SOURCE_DIR}/common/include) target_include_directories(gtest_data_pkt_stee_block PUBLIC ${CMAKE_SOURCE_DIR}/platform/include) target_link_libraries(gtest_data_pkt_stee_block temp_platform gtest) ############################################################################### # gtest_data_pkt_stee_forward ############################################################################### add_executable(gtest_data_pkt_stee_forward gtest_data_pkt_stee_forward.cpp) target_include_directories(gtest_data_pkt_stee_forward PUBLIC ${CMAKE_SOURCE_DIR}/common/include) target_include_directories(gtest_data_pkt_stee_forward PUBLIC ${CMAKE_SOURCE_DIR}/platform/include) target_link_libraries(gtest_data_pkt_stee_forward temp_platform gtest) ############################################################################### # gtest_data_pkt_stee_rx_egress ############################################################################### add_executable(gtest_data_pkt_stee_rx_egress gtest_data_pkt_stee_rx_egress.cpp) target_include_directories(gtest_data_pkt_stee_rx_egress PUBLIC ${CMAKE_SOURCE_DIR}/common/include) target_include_directories(gtest_data_pkt_stee_rx_egress PUBLIC ${CMAKE_SOURCE_DIR}/platform/include) target_link_libraries(gtest_data_pkt_stee_rx_egress temp_platform gtest) ############################################################################### # gtest_data_pkt_mirr_bypass ############################################################################### add_executable(gtest_data_pkt_mirr_bypass gtest_data_pkt_mirr_bypass.cpp) target_include_directories(gtest_data_pkt_mirr_bypass PUBLIC ${CMAKE_SOURCE_DIR}/common/include) target_include_directories(gtest_data_pkt_mirr_bypass PUBLIC ${CMAKE_SOURCE_DIR}/platform/include) target_link_libraries(gtest_data_pkt_mirr_bypass temp_platform gtest) ############################################################################### # gtest_data_pkt_mirr_block ############################################################################### add_executable(gtest_data_pkt_mirr_block gtest_data_pkt_mirr_block.cpp) target_include_directories(gtest_data_pkt_mirr_block PUBLIC ${CMAKE_SOURCE_DIR}/common/include) target_include_directories(gtest_data_pkt_mirr_block PUBLIC ${CMAKE_SOURCE_DIR}/platform/include) target_link_libraries(gtest_data_pkt_mirr_block temp_platform gtest) ############################################################################### # gtest_data_pkt_mirr_forward ############################################################################### add_executable(gtest_data_pkt_mirr_forward gtest_data_pkt_mirr_forward.cpp) target_include_directories(gtest_data_pkt_mirr_forward PUBLIC ${CMAKE_SOURCE_DIR}/common/include) target_include_directories(gtest_data_pkt_mirr_forward PUBLIC ${CMAKE_SOURCE_DIR}/platform/include) target_link_libraries(gtest_data_pkt_mirr_forward temp_platform gtest) ############################################################################### # gtest_data_pkt_mirr_rx_drop ############################################################################### add_executable(gtest_data_pkt_mirr_rx_drop gtest_data_pkt_mirr_rx_drop.cpp) target_include_directories(gtest_data_pkt_mirr_rx_drop PUBLIC ${CMAKE_SOURCE_DIR}/common/include) target_include_directories(gtest_data_pkt_mirr_rx_drop PUBLIC ${CMAKE_SOURCE_DIR}/platform/include) target_link_libraries(gtest_data_pkt_mirr_rx_drop temp_platform gtest) ############################################################################### # gtest_data_pkt_error_bypass ############################################################################### add_executable(gtest_data_pkt_error_bypass gtest_data_pkt_error_bypass.cpp) target_include_directories(gtest_data_pkt_error_bypass PUBLIC ${CMAKE_SOURCE_DIR}/common/include) target_include_directories(gtest_data_pkt_error_bypass PUBLIC ${CMAKE_SOURCE_DIR}/platform/include) target_link_libraries(gtest_data_pkt_error_bypass temp_platform gtest) ############################################################################### # gtest_mix_pkt_stee_forward ############################################################################### add_executable(gtest_mix_pkt_stee_forward gtest_mix_pkt_stee_forward.cpp) target_include_directories(gtest_mix_pkt_stee_forward PUBLIC ${CMAKE_SOURCE_DIR}/common/include) target_include_directories(gtest_mix_pkt_stee_forward PUBLIC ${CMAKE_SOURCE_DIR}/platform/include) target_link_libraries(gtest_mix_pkt_stee_forward temp_platform gtest) ############################################################################### # gtest_vlan_encapsulate ############################################################################### add_executable(gtest_vlan_encapsulate gtest_vlan_encapsulate.cpp) target_include_directories(gtest_vlan_encapsulate PUBLIC ${CMAKE_SOURCE_DIR}/common/include) target_include_directories(gtest_vlan_encapsulate PUBLIC ${CMAKE_SOURCE_DIR}/platform/include) target_link_libraries(gtest_vlan_encapsulate temp_platform gtest) ############################################################################### # gtest_discover_tests ############################################################################### include(GoogleTest) gtest_discover_tests(gtest_ctrl_pkt_opening) gtest_discover_tests(gtest_ctrl_pkt_active) gtest_discover_tests(gtest_data_pkt_stee_bypass) gtest_discover_tests(gtest_data_pkt_stee_block) gtest_discover_tests(gtest_data_pkt_stee_forward) gtest_discover_tests(gtest_data_pkt_stee_rx_egress) gtest_discover_tests(gtest_data_pkt_mirr_bypass) gtest_discover_tests(gtest_data_pkt_mirr_block) gtest_discover_tests(gtest_data_pkt_mirr_forward) gtest_discover_tests(gtest_data_pkt_mirr_rx_drop) gtest_discover_tests(gtest_data_pkt_error_bypass) gtest_discover_tests(gtest_mix_pkt_stee_forward) gtest_discover_tests(gtest_vlan_encapsulate) file(COPY ./test_data/log/ DESTINATION ./log/) file(COPY ./test_data/conf/ DESTINATION ./conf/) file(COPY ./test_data/resource/ DESTINATION ./resource/) file(COPY ${CMAKE_SOURCE_DIR}/resource/table_info.conf DESTINATION ./resource/)