Files
hm 35baae1555 test(coverage): add core-plus-v2 profile with plugin/capi/spatial/sdf/compute coverage + 20 boundary cases
Wave 8 W48 (task-123).

Profile: tools/coverage/target_profiles.json gains core-plus-v2 = core-plus 59 targets
+ 37 plugin/capi/spatial/sdf/compute targets (96 total; >=85 required). Excludes
test_curved_boolean_baseline (gcov wall-clock sensitive, same as core-plus) and
test_plugin_ecosystem (asserts all official plugin kinds, needs full plugin build).
line_pct_gate = 52.0 derived from the measured 54.01% (floor - 2pp).

Tests: 5 new files / 20 cases covering plugin lifecycle + capability registry
semantics, C API export boundaries, BVH edge cases, SDF field nodes and compute
SIMD lane boundaries. All 20 pass; module-subset ctest (Plugin|Capi|Spatial|Sdf|
Compute|Brep|Curves|Foundation) = 721/721 passed.

Measurement (build-cov8, RelWithDebInfo + VDE_ENABLE_COVERAGE, MinGW gcc 16.1.0):
before core-plus 50.91% (63374/124474), after core-plus-v2 54.01% (70324/130198),
func 62.88% (3568/5674), branch 33.55%; 2418/2418 cases pass. --update-baseline
wrote tools/coverage/baseline.json core-plus-v2 entry and
--min-line-pct baseline --strict-baseline PASSed (status PASS, line gate 54.01%).

Plugin fixture fix: test_plugin_extensions build deps now include vde_service_runner /
vde_service_stl_convert / vde_service_gcs_solve (3 external-service cases failed when
only the target was built; 9/9 pass after the fix).

CI: nightly coverage-nightly adds a core-plus-v2 report-only archive step and an
opt-in hard gate gated by vars.VDE_ENABLE_CORE_PLUS_V2=1; pr-quality dry-run plan
adds --profile core-plus-v2. Evidence: docs/planning/wave8/cov-notes.md and
build/kcp8_evidence/cov/ (before/after/after-gate reports, ctest logs).

Validation: validate_workflows.py --strict PASS 2/2, vde_release.py --check PASS
(14 checks, 0 fail/0 warn), no product (src/) changes.
2026-11-20 14:55:34 +08:00

680 lines
36 KiB
CMake
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
add_vde_test(test_plugin_manager)
include(fixtures/reload_fixture.cmake)
add_vde_test(test_plugin_integration)
target_compile_definitions(test_plugin_manager PRIVATE
VDE_PLUGIN_SAMPLE_DIR="${CMAKE_BINARY_DIR}/plugins")
target_compile_definitions(test_plugin_integration PRIVATE
VDE_PLUGIN_SAMPLE_DIR="${CMAKE_BINARY_DIR}/plugins")
if(TARGET vde_sample_vbox)
add_dependencies(test_plugin_manager vde_sample_vbox)
add_dependencies(test_plugin_integration vde_sample_vbox)
endif()
# 这两个测试在 sample_vbox 未构建时会跳过 6 个加载/格式分派用例,
# 让“构建测试目标”本身保证样例插件就绪,避免测试假绿。
if(TARGET vde_sample_vbox)
add_dependencies(test_plugin_manager vde_sample_vbox)
add_dependencies(test_plugin_integration vde_sample_vbox)
endif()
# P1-2 官方格式插件(STL/OBJ/PLY)+ import_cad 插件分派回退
# P1.x:import_cad 分派实现位于 vde_io(brep/format_io.cpp)——io 关闭时不构建
if(VDE_ENABLE_io)
add_vde_test(test_plugin_format_official)
target_compile_definitions(test_plugin_format_official PRIVATE
VDE_PLUGIN_SAMPLE_DIR="${CMAKE_BINARY_DIR}/plugins"
VDE_PLUGIN_OFFICIAL_DIR="${CMAKE_BINARY_DIR}/plugins/official"
VDE_TEST_DATA_DIR="${CMAKE_SOURCE_DIR}")
foreach(_dep vde_official_stl vde_official_obj vde_official_ply vde_official_3mf vde_official_gltf)
if(TARGET ${_dep})
add_dependencies(test_plugin_format_official ${_dep})
endif()
endforeach()
endif()
# P2-2 扩展点(CAE/CAM ABI 1.2)+ 进程外服务协议最小验证
add_vde_test(test_plugin_extensions)
target_compile_definitions(test_plugin_extensions PRIVATE
VDE_PLUGIN_DIRS="${CMAKE_BINARY_DIR}/plugins"
VDE_PLUGIN_EXTERNAL_DIR="${CMAKE_BINARY_DIR}/plugins/external")
foreach(_dep vde_sample_cae vde_sample_cam_post vde_abi11_compat vde_service_runner vde_service_stl_convert vde_service_gcs_solve)
if(TARGET ${_dep})
add_dependencies(test_plugin_extensions ${_dep})
endif()
endforeach()
# P2-3 STEP/IGES/DXF 官方格式插件(纯 C ABI;内置优先,插件回退/显式选择)
add_vde_test(test_plugin_official_cad_formats)
target_compile_definitions(test_plugin_official_cad_formats PRIVATE
VDE_PLUGIN_OFFICIAL_DIR="${CMAKE_BINARY_DIR}/plugins/official")
foreach(_dep vde_official_step vde_official_iges vde_official_dxf)
if(TARGET ${_dep})
add_dependencies(test_plugin_official_cad_formats ${_dep})
endif()
endforeach()
# P2-4 进程外服务(vde-service)接入:清单发现/调用/超时/沙箱/错误路径
add_executable(vde_test_external_service external/test_service_helper.cpp)
target_include_directories(vde_test_external_service
PRIVATE "${CMAKE_SOURCE_DIR}/plugins/external/common")
set_target_properties(vde_test_external_service PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tests/plugin"
LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/tests/plugin"
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/tests/plugin"
LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/tests/plugin"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/tests/plugin"
LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/tests/plugin"
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/tests/plugin"
LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_BINARY_DIR}/tests/plugin"
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_BINARY_DIR}/tests/plugin")
add_vde_test(test_plugin_external_service)
target_compile_definitions(test_plugin_external_service PRIVATE
VDE_EXTERNAL_STL_SERVICE_DIR="${CMAKE_BINARY_DIR}/plugins/external/sample_stl_converter"
VDE_EXTERNAL_GCS_SERVICE_DIR="${CMAKE_BINARY_DIR}/plugins/external/sample_gcs_solver"
VDE_TEST_SERVICE_EXE="${CMAKE_BINARY_DIR}/tests/plugin/vde_test_external_service${CMAKE_EXECUTABLE_SUFFIX}")
add_dependencies(test_plugin_external_service vde_service_stl_convert vde_service_gcs_solve vde_test_external_service)
# P3-1 plugin 签名/许可/权限(mock 验签,不依赖加密库)
add_vde_test(test_plugin_security)
# P3-3 官方 PLY 插件二进制读写(ASCII/binary LE/BE;写 ASCII/binary LE)
add_vde_test(test_plugin_ply_binary)
target_compile_definitions(test_plugin_ply_binary PRIVATE
VDE_PLUGIN_OFFICIAL_DIR="${CMAKE_BINARY_DIR}/plugins/official")
if(TARGET vde_official_ply)
add_dependencies(test_plugin_ply_binary vde_official_ply)
endif()
# WP-P4-21 官方 ASCII OFF 插件(确定性 mock 宿主;真实 C ABI 动态加载)。
# 该测试只依赖纯 C ABI(vde_plugin_api.h)+ gtest,不链接内核,因此不使用
# add_vde_test(其默认链接 vde);目标按与 add_vde_test 相同的测试目录约定注册。
add_executable(test_official_off test_official_off.cpp)
target_link_libraries(test_official_off PRIVATE GTest::gtest GTest::gtest_main ${CMAKE_DL_LIBS})
target_include_directories(test_official_off PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/../../include")
target_compile_definitions(test_official_off PRIVATE
VDE_TEST_TEMP_DIR="${VDE_TEST_TEMP_DIR}"
VDE_PLUGIN_OFFICIAL_DIR="${CMAKE_BINARY_DIR}/plugins/official")
add_dependencies(test_official_off vde_official_off)
gtest_discover_tests(test_official_off PROPERTIES TIMEOUT 600)
# WP-P4-22 官方 AMF 插件(确定性 mock 宿主;真实 C ABI 动态加载)。
# 与 test_official_off 相同:只依赖纯 C ABI + gtest,不链接内核。
add_executable(test_official_amf test_official_amf.cpp)
target_link_libraries(test_official_amf PRIVATE GTest::gtest GTest::gtest_main ${CMAKE_DL_LIBS})
target_include_directories(test_official_amf PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/../../include")
target_compile_definitions(test_official_amf PRIVATE
VDE_TEST_TEMP_DIR="${VDE_TEST_TEMP_DIR}"
VDE_PLUGIN_OFFICIAL_DIR="${CMAKE_BINARY_DIR}/plugins/official")
add_dependencies(test_official_amf vde_official_amf)
gtest_discover_tests(test_official_amf PROPERTIES TIMEOUT 600)
# WP-P4-23 官方 VRML 2.0 插件(使用 PluginManager/geometry host 服务;链接 vde)
add_vde_test(test_official_vrml)
target_compile_definitions(test_official_vrml PRIVATE
VDE_TEST_TEMP_DIR="${VDE_TEST_TEMP_DIR}"
VDE_PLUGIN_OFFICIAL_DIR="${CMAKE_BINARY_DIR}/plugins/official")
add_dependencies(test_official_vrml vde_official_vrml)
# WP-P4-26 官方 OBJ 写能力(PluginManager/geometry host 服务;链接 vde)
add_vde_test(test_official_obj_write)
target_compile_definitions(test_official_obj_write PRIVATE
VDE_TEST_TEMP_DIR="${VDE_TEST_TEMP_DIR}"
VDE_PLUGIN_OFFICIAL_DIR="${CMAKE_BINARY_DIR}/plugins/official")
add_dependencies(test_official_obj_write vde_official_obj)
# WP-P4-24 官方 COLLADA 插件(mock 宿主 + 真实 C ABI 动态加载,不链接内核)
add_executable(test_official_collada test_official_collada.cpp)
target_link_libraries(test_official_collada PRIVATE GTest::gtest GTest::gtest_main ${CMAKE_DL_LIBS})
target_include_directories(test_official_collada PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/../../include")
target_compile_definitions(test_official_collada PRIVATE
VDE_TEST_TEMP_DIR="${VDE_TEST_TEMP_DIR}"
VDE_PLUGIN_OFFICIAL_DIR="${CMAKE_BINARY_DIR}/plugins/official")
add_dependencies(test_official_collada vde_official_collada)
gtest_discover_tests(test_official_collada PROPERTIES TIMEOUT 600)
# P4-30 官方 Nelder-Mead 优化器插件(mock host + 真实 C ABI 动态加载)
add_vde_test(test_official_optimizer_nelder_mead)
target_compile_definitions(test_official_optimizer_nelder_mead PRIVATE
VDE_TEST_TEMP_DIR="${VDE_TEST_TEMP_DIR}"
VDE_PLUGIN_OFFICIAL_DIR="${CMAKE_BINARY_DIR}/plugins/official")
add_dependencies(test_official_optimizer_nelder_mead vde_official_optimizer_nelder_mead)
# P4-32 官方体素 Mesher / P4-33 官方 IO_BATCH 网格转换 / P4-34 DXF 写
add_vde_test(test_official_mesher_voxel)
target_compile_definitions(test_official_mesher_voxel PRIVATE
VDE_PLUGIN_OFFICIAL_DIR="${CMAKE_BINARY_DIR}/plugins/official")
add_dependencies(test_official_mesher_voxel vde_official_mesher_voxel)
add_vde_test(test_official_io_batch_mesh)
target_compile_definitions(test_official_io_batch_mesh PRIVATE
VDE_PLUGIN_OFFICIAL_DIR="${CMAKE_BINARY_DIR}/plugins/official")
add_dependencies(test_official_io_batch_mesh vde_official_io_batch_mesh)
add_vde_test(test_official_dxf_write)
target_compile_definitions(test_official_dxf_write PRIVATE
VDE_PLUGIN_OFFICIAL_DIR="${CMAKE_BINARY_DIR}/plugins/official")
add_dependencies(test_official_dxf_write vde_official_dxf)
# P4-35 官方 CAM G-code 后处理插件(mock host + 真实 C ABI 动态加载)
add_vde_test(test_official_cam_gcode)
target_compile_definitions(test_official_cam_gcode PRIVATE
VDE_PLUGIN_OFFICIAL_DIR="${CMAKE_BINARY_DIR}/plugins/official")
add_dependencies(test_official_cam_gcode vde_official_cam_gcode)
# P3-9 进程外 GCS 求解器(vde-service 能力 gcs:solve;mock VDCS)
add_vde_test(test_plugin_external_gcs)
target_compile_definitions(test_plugin_external_gcs PRIVATE
VDE_EXTERNAL_GCS_SERVICE_DIR="${CMAKE_BINARY_DIR}/plugins/external/sample_gcs_solver"
VDE_TEST_SERVICE_EXE="${CMAKE_BINARY_DIR}/tests/plugin/vde_test_external_service${CMAKE_EXECUTABLE_SUFFIX}")
add_dependencies(test_plugin_external_gcs vde_service_gcs_solve vde_test_external_service)
# P3-8 插件 ABI 1.3:GCS 约束求解器扩展点(VdeGcsSolverPlugin / solve_gcs)
add_vde_test(test_plugin_gcs)
target_compile_definitions(test_plugin_gcs PRIVATE
VDE_PLUGIN_DIRS="${CMAKE_BINARY_DIR}/plugins")
foreach(_dep vde_sample_gcs vde_abi11_compat)
if(TARGET ${_dep})
add_dependencies(test_plugin_gcs ${_dep})
endif()
endforeach()
# P3-14c 外部服务容器运行时抽象(fake runtime 验证命令构造/无 runtime 拒绝与降级)
add_executable(vde_test_fake_container_runtime external/test_fake_container_runtime.cpp)
target_include_directories(vde_test_fake_container_runtime
PRIVATE "${CMAKE_SOURCE_DIR}/plugins/external/common")
set_target_properties(vde_test_fake_container_runtime PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tests/plugin"
LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/tests/plugin"
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/tests/plugin"
LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/tests/plugin"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/tests/plugin"
LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/tests/plugin"
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/tests/plugin"
LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_BINARY_DIR}/tests/plugin"
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_BINARY_DIR}/tests/plugin")
add_vde_test(test_plugin_external_container)
target_compile_definitions(test_plugin_external_container PRIVATE
VDE_TEST_SERVICE_EXE="${CMAKE_BINARY_DIR}/tests/plugin/vde_test_external_service${CMAKE_EXECUTABLE_SUFFIX}"
VDE_TEST_CONTAINER_RUNTIME_EXE="${CMAKE_BINARY_DIR}/tests/plugin/vde_test_fake_container_runtime${CMAKE_EXECUTABLE_SUFFIX}")
add_dependencies(test_plugin_external_container vde_test_external_service vde_test_fake_container_runtime)
# P3-17b:vde_plugin_tool scaffold 端到端回归(四类独立 build + --check/--list + 负例)
# 脚本:tools/vde_plugin_tool/scaffold_smoke.cmake;此处注册(enable_testing 之后)。
if(TARGET vde_plugin_tool)
add_test(NAME VDE_PluginToolScaffoldSmoke
COMMAND ${CMAKE_COMMAND}
"-DVDE_TOOL=$<TARGET_FILE:vde_plugin_tool>"
"-DVDE_SOURCE_DIR=${CMAKE_SOURCE_DIR}"
"-DVDE_BINARY_DIR=${CMAKE_BINARY_DIR}"
"-DVDE_GENERATOR=${CMAKE_GENERATOR}"
-P "${CMAKE_SOURCE_DIR}/tools/vde_plugin_tool/scaffold_smoke.cmake")
set_tests_properties(VDE_PluginToolScaffoldSmoke PROPERTIES TIMEOUT 600)
endif()
# P4-37:vde_plugin_tool lint <dir> smoke(官方构建目录 PASS,坏 manifest FAIL)
if(TARGET vde_plugin_tool)
add_test(NAME VDE_PluginToolLintSmoke
COMMAND ${CMAKE_COMMAND}
"-DVDE_TOOL=$<TARGET_FILE:vde_plugin_tool>"
"-DVDE_BINARY_DIR=${CMAKE_BINARY_DIR}"
-P "${CMAKE_SOURCE_DIR}/tests/plugin/lint_smoke.cmake")
set_tests_properties(VDE_PluginToolLintSmoke PROPERTIES TIMEOUT 120)
endif()
# P3-17c:vde_plugin_tool 远程安装/依赖解析/卸载/原子升级(本地索引 + 本地 HTTP)
add_vde_test(test_plugin_tool_remote_install)
target_compile_definitions(test_plugin_tool_remote_install PRIVATE
VDE_PLUGIN_TOOL_EXE="$<TARGET_FILE:vde_plugin_tool>")
add_dependencies(test_plugin_tool_remote_install vde_plugin_tool)
# P3-13b:索引签名 key_id 吊销强制(--revoked-keys:行/JSON 格式;verify/install/upgrade)
if(TARGET vde_plugin_tool)
add_test(NAME VDE_PluginToolIndexRevocation
COMMAND ${CMAKE_COMMAND}
"-DVDE_TOOL=$<TARGET_FILE:vde_plugin_tool>"
"-DVDE_SOURCE_DIR=${CMAKE_SOURCE_DIR}"
"-DVDE_BINARY_DIR=${CMAKE_BINARY_DIR}"
"-DVDE_GENERATOR=${CMAKE_GENERATOR}"
-P "${CMAKE_SOURCE_DIR}/tests/plugin/index_revocation_smoke.cmake")
set_tests_properties(VDE_PluginToolIndexRevocation PROPERTIES TIMEOUT 600)
endif()
# P4-08:签名 CRL 分发(--crl/--crl-pubkey;verify-index/install/upgrade 合并吊销)
add_vde_test(test_plugin_crl)
target_compile_definitions(test_plugin_crl PRIVATE
VDE_PLUGIN_TOOL_EXE="$<TARGET_FILE:vde_plugin_tool>")
add_dependencies(test_plugin_crl vde_plugin_tool)
# P4 / ABI 1.4:Mesher 扩展点(sample_mesher + ABI 1.3 兼容矩阵 + tool --abi/--check)
if(NOT TARGET vde_sample_mesher)
add_subdirectory("${CMAKE_SOURCE_DIR}/plugins/sample_mesher"
"${CMAKE_BINARY_DIR}/plugins/sample_mesher")
endif()
add_vde_test(test_plugin_mesher)
target_compile_definitions(test_plugin_mesher PRIVATE
VDE_PLUGIN_DIRS="${CMAKE_BINARY_DIR}/plugins"
VDE_ABI_MATRIX_DIR="${CMAKE_BINARY_DIR}/plugin_abi_matrix"
VDE_PLUGIN_TOOL_EXE="$<TARGET_FILE:vde_plugin_tool>")
add_dependencies(test_plugin_mesher vde_sample_mesher)
if(TARGET vde_abi_matrix_3)
add_dependencies(test_plugin_mesher vde_abi_matrix_3)
endif()
if(TARGET vde_plugin_tool)
add_dependencies(test_plugin_mesher vde_plugin_tool)
endif()
# P4 / ABI 1.4:模拟旧 ABI 1.3 插件(struct_size=48)二进制兼容夹具
set(_legacy_root "${CMAKE_BINARY_DIR}/plugins_legacy")
file(MAKE_DIRECTORY "${_legacy_root}/format")
file(MAKE_DIRECTORY "${_legacy_root}/mesher48")
add_library(vde_test_legacy_format SHARED fixtures/legacy_plugin.cpp)
target_include_directories(vde_test_legacy_format PRIVATE "${CMAKE_SOURCE_DIR}/include")
target_compile_definitions(vde_test_legacy_format PRIVATE VDE_PLUGIN_IMPL=1)
set_target_properties(vde_test_legacy_format PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${_legacy_root}/format"
RUNTIME_OUTPUT_DIRECTORY "${_legacy_root}/format"
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
LIBRARY_OUTPUT_DIRECTORY_DEBUG "${_legacy_root}/format"
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${_legacy_root}/format"
LIBRARY_OUTPUT_DIRECTORY_RELEASE "${_legacy_root}/format"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${_legacy_root}/format"
LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${_legacy_root}/format"
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${_legacy_root}/format"
LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL "${_legacy_root}/format"
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${_legacy_root}/format")
if(WIN32)
set_target_properties(vde_test_legacy_format PROPERTIES PREFIX "")
endif()
file(WRITE "${_legacy_root}/format/vde-plugin.json"
"{\n \"id\": \"com.vde.test.legacy.format\",\n \"name\": \"Legacy ABI 1.3 format\",\n"
" \"version\": \"0.1.0\",\n \"kind\": \"format\",\n"
" \"abi\": { \"major\": 1, \"minor\": 3 },\n"
" \"entry\": { \"windows\": \"vde_test_legacy_format.dll\", "
"\"linux\": \"libvde_test_legacy_format.so\" },\n"
" \"capabilities\": [\"format:legacy\"]\n}\n")
add_library(vde_test_legacy_mesher48 SHARED fixtures/legacy_plugin.cpp)
target_include_directories(vde_test_legacy_mesher48 PRIVATE "${CMAKE_SOURCE_DIR}/include")
target_compile_definitions(vde_test_legacy_mesher48 PRIVATE
VDE_PLUGIN_IMPL=1 VDE_LEGACY_KIND_MESHER=1)
set_target_properties(vde_test_legacy_mesher48 PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${_legacy_root}/mesher48"
RUNTIME_OUTPUT_DIRECTORY "${_legacy_root}/mesher48"
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
LIBRARY_OUTPUT_DIRECTORY_DEBUG "${_legacy_root}/mesher48"
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${_legacy_root}/mesher48"
LIBRARY_OUTPUT_DIRECTORY_RELEASE "${_legacy_root}/mesher48"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${_legacy_root}/mesher48"
LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${_legacy_root}/mesher48"
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${_legacy_root}/mesher48"
LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL "${_legacy_root}/mesher48"
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${_legacy_root}/mesher48")
if(WIN32)
set_target_properties(vde_test_legacy_mesher48 PROPERTIES PREFIX "")
endif()
file(WRITE "${_legacy_root}/mesher48/vde-plugin.json"
"{\n \"id\": \"com.vde.test.legacy.mesher48\",\n \"name\": \"Legacy 48B mesher\",\n"
" \"version\": \"0.1.0\",\n \"kind\": \"mesher\",\n"
" \"abi\": { \"major\": 1, \"minor\": 4 },\n"
" \"entry\": { \"windows\": \"vde_test_legacy_mesher48.dll\", "
"\"linux\": \"libvde_test_legacy_mesher48.so\" },\n"
" \"capabilities\": [\"mesher:legacy\"]\n}\n")
target_compile_definitions(test_plugin_mesher PRIVATE
VDE_LEGACY_FORMAT_DIR="${_legacy_root}/format"
VDE_LEGACY_MESHER48_DIR="${_legacy_root}/mesher48")
add_dependencies(test_plugin_mesher vde_test_legacy_format vde_test_legacy_mesher48)
if(TARGET vde_plugin_tool)
add_test(NAME VDE_PluginToolMesherAbi
COMMAND ${CMAKE_COMMAND}
"-DVDE_TOOL=$<TARGET_FILE:vde_plugin_tool>"
"-DVDE_MESHER_DIR=${CMAKE_BINARY_DIR}/plugins/sample_mesher"
-P "${CMAKE_SOURCE_DIR}/tests/plugin/mesher_tool_smoke.cmake")
set_tests_properties(VDE_PluginToolMesherAbi PROPERTIES TIMEOUT 300)
endif()
# P4 / ABI 1.5:optimizer + io_batch 扩展点(samples + 兼容夹具 + test_plugin_abi15)
if(NOT TARGET vde_sample_optimizer)
add_subdirectory("${CMAKE_SOURCE_DIR}/plugins/sample_optimizer"
"${CMAKE_BINARY_DIR}/plugins/sample_optimizer")
endif()
if(NOT TARGET vde_sample_io_batch)
add_subdirectory("${CMAKE_SOURCE_DIR}/plugins/sample_io_batch"
"${CMAKE_BINARY_DIR}/plugins/sample_io_batch")
endif()
set(_abi15_root "${CMAKE_BINARY_DIR}/plugins_abi15")
foreach(_variant format56 optimizer56 iobatch56)
file(MAKE_DIRECTORY "${_abi15_root}/${_variant}")
endforeach()
add_library(vde_test_abi15_format56 SHARED fixtures/abi15_plugin.cpp)
target_include_directories(vde_test_abi15_format56 PRIVATE "${CMAKE_SOURCE_DIR}/include")
target_compile_definitions(vde_test_abi15_format56 PRIVATE VDE_PLUGIN_IMPL=1)
set_target_properties(vde_test_abi15_format56 PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${_abi15_root}/format56"
RUNTIME_OUTPUT_DIRECTORY "${_abi15_root}/format56"
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
LIBRARY_OUTPUT_DIRECTORY_DEBUG "${_abi15_root}/format56"
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${_abi15_root}/format56"
LIBRARY_OUTPUT_DIRECTORY_RELEASE "${_abi15_root}/format56"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${_abi15_root}/format56"
LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${_abi15_root}/format56"
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${_abi15_root}/format56"
LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL "${_abi15_root}/format56"
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${_abi15_root}/format56")
add_library(vde_test_abi15_optimizer56 SHARED fixtures/abi15_plugin.cpp)
target_include_directories(vde_test_abi15_optimizer56 PRIVATE "${CMAKE_SOURCE_DIR}/include")
target_compile_definitions(vde_test_abi15_optimizer56 PRIVATE
VDE_PLUGIN_IMPL=1 VDE_ABI15_OPTIMIZER56=1)
set_target_properties(vde_test_abi15_optimizer56 PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${_abi15_root}/optimizer56"
RUNTIME_OUTPUT_DIRECTORY "${_abi15_root}/optimizer56"
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
LIBRARY_OUTPUT_DIRECTORY_DEBUG "${_abi15_root}/optimizer56"
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${_abi15_root}/optimizer56"
LIBRARY_OUTPUT_DIRECTORY_RELEASE "${_abi15_root}/optimizer56"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${_abi15_root}/optimizer56"
LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${_abi15_root}/optimizer56"
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${_abi15_root}/optimizer56"
LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL "${_abi15_root}/optimizer56"
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${_abi15_root}/optimizer56")
add_library(vde_test_abi15_iobatch56 SHARED fixtures/abi15_plugin.cpp)
target_include_directories(vde_test_abi15_iobatch56 PRIVATE "${CMAKE_SOURCE_DIR}/include")
target_compile_definitions(vde_test_abi15_iobatch56 PRIVATE
VDE_PLUGIN_IMPL=1 VDE_ABI15_IOBATCH56=1)
set_target_properties(vde_test_abi15_iobatch56 PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${_abi15_root}/iobatch56"
RUNTIME_OUTPUT_DIRECTORY "${_abi15_root}/iobatch56"
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
LIBRARY_OUTPUT_DIRECTORY_DEBUG "${_abi15_root}/iobatch56"
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${_abi15_root}/iobatch56"
LIBRARY_OUTPUT_DIRECTORY_RELEASE "${_abi15_root}/iobatch56"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${_abi15_root}/iobatch56"
LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${_abi15_root}/iobatch56"
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${_abi15_root}/iobatch56"
LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL "${_abi15_root}/iobatch56"
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${_abi15_root}/iobatch56")
if(WIN32)
foreach(_t vde_test_abi15_format56 vde_test_abi15_optimizer56 vde_test_abi15_iobatch56)
set_target_properties(${_t} PROPERTIES PREFIX "")
endforeach()
endif()
file(WRITE "${_abi15_root}/format56/vde-plugin.json"
"{\n \"id\": \"com.vde.test.abi15.format56\",\n \"version\": \"0.1.0\",\n"
" \"kind\": \"format\",\n \"abi\": { \"major\": 1, \"minor\": 4 },\n"
" \"entry\": { \"windows\": \"vde_test_abi15_format56.dll\", "
"\"linux\": \"libvde_test_abi15_format56.so\" },\n"
" \"capabilities\": [\"format:abi15\"]\n}\n")
file(WRITE "${_abi15_root}/optimizer56/vde-plugin.json"
"{\n \"id\": \"com.vde.test.abi15.optimizer56\",\n \"version\": \"0.1.0\",\n"
" \"kind\": \"optimizer\",\n \"abi\": { \"major\": 1, \"minor\": 5 },\n"
" \"entry\": { \"windows\": \"vde_test_abi15_optimizer56.dll\", "
"\"linux\": \"libvde_test_abi15_optimizer56.so\" },\n"
" \"capabilities\": [\"optimizer:mock\"]\n}\n")
file(WRITE "${_abi15_root}/iobatch56/vde-plugin.json"
"{\n \"id\": \"com.vde.test.abi15.iobatch56\",\n \"version\": \"0.1.0\",\n"
" \"kind\": \"io_batch\",\n \"abi\": { \"major\": 1, \"minor\": 5 },\n"
" \"entry\": { \"windows\": \"vde_test_abi15_iobatch56.dll\", "
"\"linux\": \"libvde_test_abi15_iobatch56.so\" },\n"
" \"capabilities\": [\"io_batch:mock\"]\n}\n")
add_vde_test(test_plugin_abi15)
target_compile_definitions(test_plugin_abi15 PRIVATE
VDE_PLUGIN_DIRS="${CMAKE_BINARY_DIR}/plugins"
VDE_ABI_MATRIX_DIR="${CMAKE_BINARY_DIR}/plugin_abi_matrix"
VDE_ABI15_FIXTURE_DIR="${_abi15_root}")
add_dependencies(test_plugin_abi15 vde_sample_optimizer vde_sample_io_batch
vde_test_abi15_format56 vde_test_abi15_optimizer56 vde_test_abi15_iobatch56)
if(TARGET vde_abi_matrix_5)
add_dependencies(test_plugin_abi15 vde_abi_matrix_5)
add_dependencies(test_plugin_abi15 vde_abi_matrix_6)
add_dependencies(test_plugin_abi15 vde_abi_matrix_7)
add_dependencies(test_plugin_abi15 vde_abi_matrix_8)
endif()
if(TARGET vde_abi_matrix_6)
add_dependencies(test_plugin_abi15 vde_abi_matrix_6)
endif()
# P4-38 / ABI 1.6:IO_BATCH run_v2 回填 + 旧 ABI 1.5 run 回退夹具
set(_abi16_root "${CMAKE_BINARY_DIR}/plugins_abi16")
file(MAKE_DIRECTORY "${_abi16_root}/legacy_iobatch")
add_library(vde_test_abi16_legacy_iobatch SHARED fixtures/abi16_legacy_io_batch.cpp)
target_include_directories(vde_test_abi16_legacy_iobatch PRIVATE "${CMAKE_SOURCE_DIR}/include")
target_compile_definitions(vde_test_abi16_legacy_iobatch PRIVATE VDE_PLUGIN_IMPL=1)
set_target_properties(vde_test_abi16_legacy_iobatch PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${_abi16_root}/legacy_iobatch"
RUNTIME_OUTPUT_DIRECTORY "${_abi16_root}/legacy_iobatch"
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
LIBRARY_OUTPUT_DIRECTORY_DEBUG "${_abi16_root}/legacy_iobatch"
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${_abi16_root}/legacy_iobatch"
LIBRARY_OUTPUT_DIRECTORY_RELEASE "${_abi16_root}/legacy_iobatch"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${_abi16_root}/legacy_iobatch"
LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${_abi16_root}/legacy_iobatch"
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${_abi16_root}/legacy_iobatch"
LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL "${_abi16_root}/legacy_iobatch"
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${_abi16_root}/legacy_iobatch")
if(WIN32)
set_target_properties(vde_test_abi16_legacy_iobatch PROPERTIES PREFIX "")
endif()
file(WRITE "${_abi16_root}/legacy_iobatch/vde-plugin.json"
"{\n \"id\": \"com.vde.test.abi16.legacy_iobatch\",\n"
" \"version\": \"0.1.0\",\n \"kind\": \"io_batch\",\n"
" \"abi\": { \"major\": 1, \"minor\": 5 },\n"
" \"entry\": { \"windows\": \"vde_test_abi16_legacy_iobatch.dll\", "
"\"linux\": \"libvde_test_abi16_legacy_iobatch.so\" },\n"
" \"capabilities\": [\"io_batch:legacy\"]\n}\n")
add_vde_test(test_plugin_abi16)
target_compile_definitions(test_plugin_abi16 PRIVATE
VDE_PLUGIN_DIRS="${CMAKE_BINARY_DIR}/plugins"
VDE_ABI16_LEGACY_DIR="${_abi16_root}/legacy_iobatch")
add_dependencies(test_plugin_abi16 vde_sample_io_batch vde_official_io_batch_mesh
vde_test_abi16_legacy_iobatch)
if(TARGET vde_abi_matrix_6)
add_dependencies(test_plugin_abi16 vde_abi_matrix_6)
endif()
# ═══════════════════════════════════════════════════════════
# WP-P4-13 外部服务模板 e2e(C++/Python 模板;模板本身不加入默认构建)
# ═══════════════════════════════════════════════════════════
find_package(Python3 COMPONENTS Interpreter QUIET)
set(_vde_ext_tpl_dir "${CMAKE_BINARY_DIR}/tests/plugin/external_service_templates")
add_executable(vde_test_template_cpp_service
"${CMAKE_SOURCE_DIR}/templates/external-service/cpp/vde_service_echo.cpp")
set_target_properties(vde_test_template_cpp_service PROPERTIES
OUTPUT_NAME vde_service_echo
RUNTIME_OUTPUT_DIRECTORY "${_vde_ext_tpl_dir}/cpp"
LIBRARY_OUTPUT_DIRECTORY_DEBUG "${_vde_ext_tpl_dir}/cpp"
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${_vde_ext_tpl_dir}/cpp"
LIBRARY_OUTPUT_DIRECTORY_RELEASE "${_vde_ext_tpl_dir}/cpp"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${_vde_ext_tpl_dir}/cpp"
LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${_vde_ext_tpl_dir}/cpp"
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${_vde_ext_tpl_dir}/cpp"
LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL "${_vde_ext_tpl_dir}/cpp"
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${_vde_ext_tpl_dir}/cpp")
target_compile_features(vde_test_template_cpp_service PRIVATE cxx_std_17)
if(MINGW)
target_link_options(vde_test_template_cpp_service PRIVATE
-static-libgcc -static-libstdc++)
endif()
add_custom_command(TARGET vde_test_template_cpp_service POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"${CMAKE_SOURCE_DIR}/templates/external-service/cpp/vde-service.json"
"${_vde_ext_tpl_dir}/cpp/vde-service.json")
add_executable(vde_test_template_python_launcher
"${CMAKE_SOURCE_DIR}/templates/external-service/python/launcher/vde_service_echo_launch.cpp")
set_target_properties(vde_test_template_python_launcher PROPERTIES
OUTPUT_NAME vde_service_echo_launch
RUNTIME_OUTPUT_DIRECTORY "${_vde_ext_tpl_dir}/python"
LIBRARY_OUTPUT_DIRECTORY_DEBUG "${_vde_ext_tpl_dir}/python"
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${_vde_ext_tpl_dir}/python"
LIBRARY_OUTPUT_DIRECTORY_RELEASE "${_vde_ext_tpl_dir}/python"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${_vde_ext_tpl_dir}/python"
LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${_vde_ext_tpl_dir}/python"
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${_vde_ext_tpl_dir}/python"
LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL "${_vde_ext_tpl_dir}/python"
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${_vde_ext_tpl_dir}/python")
target_compile_features(vde_test_template_python_launcher PRIVATE cxx_std_17)
if(MINGW)
target_link_options(vde_test_template_python_launcher PRIVATE
-static-libgcc -static-libstdc++)
endif()
add_custom_command(TARGET vde_test_template_python_launcher POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"${CMAKE_SOURCE_DIR}/templates/external-service/python/vde-service.json"
"${_vde_ext_tpl_dir}/python/vde-service.json"
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"${CMAKE_SOURCE_DIR}/templates/external-service/python/vde_service_echo.py"
"${_vde_ext_tpl_dir}/python/vde_service_echo.py")
add_vde_test(test_external_service_templates)
target_compile_definitions(test_external_service_templates PRIVATE
VDE_TEMPLATE_CPP_DIR="${_vde_ext_tpl_dir}/cpp"
VDE_TEMPLATE_CPP_EXE="${_vde_ext_tpl_dir}/cpp/vde_service_echo${CMAKE_EXECUTABLE_SUFFIX}"
VDE_TEMPLATE_PYTHON_DIR="${_vde_ext_tpl_dir}/python"
VDE_TEMPLATE_PYTHON_LAUNCHER="${_vde_ext_tpl_dir}/python/vde_service_echo_launch${CMAKE_EXECUTABLE_SUFFIX}"
VDE_TEMPLATE_PYTHON_EXE="${Python3_EXECUTABLE}")
add_dependencies(test_external_service_templates
vde_test_template_cpp_service vde_test_template_python_launcher)
if(Python3_Interpreter_FOUND)
add_test(NAME VDE_ExternalServiceTemplatesContainerSmoke
COMMAND "${Python3_EXECUTABLE}"
"${CMAKE_SOURCE_DIR}/tests/plugin/external_service_templates_container_smoke.py"
"${CMAKE_SOURCE_DIR}")
set_tests_properties(VDE_ExternalServiceTemplatesContainerSmoke PROPERTIES
SKIP_RETURN_CODE 77 TIMEOUT 1800)
endif()
# P4-40 / ABI 1.7:GEOM_OP 扩展点(官方 geom_analyze + ABI17/geom 测试)
add_vde_test(test_plugin_abi17)
target_compile_definitions(test_plugin_abi17 PRIVATE
VDE_PLUGIN_DIRS="${CMAKE_BINARY_DIR}/plugins"
VDE_ABI_MATRIX_DIR="${CMAKE_BINARY_DIR}/plugin_abi_matrix")
add_dependencies(test_plugin_abi17 vde_official_geom_analyze)
if(TARGET vde_abi_matrix_7)
add_dependencies(test_plugin_abi17 vde_abi_matrix_7)
endif()
add_vde_test(test_official_geom_analyze)
target_compile_definitions(test_official_geom_analyze PRIVATE
VDE_PLUGIN_DIRS="${CMAKE_BINARY_DIR}/plugins")
add_dependencies(test_official_geom_analyze vde_official_geom_analyze)
# P4-41: vde_plugin_tool package/list/uninstall (deterministic archive + sha256/list/uninstall safety)
if(TARGET vde_plugin_tool)
add_test(NAME VDE_PluginToolPackageListUninstall
COMMAND ${CMAKE_COMMAND}
"-DVDE_TOOL=$<TARGET_FILE:vde_plugin_tool>"
"-DVDE_BINARY_DIR=${CMAKE_BINARY_DIR}"
-P "${CMAKE_SOURCE_DIR}/tests/plugin/package_tool_smoke.cmake")
set_tests_properties(VDE_PluginToolPackageListUninstall PROPERTIES TIMEOUT 300)
endif()
# P4-43 / ABI 1.8:UI / BINDING 扩展点(官方 ui_theme / binding_meta)
add_vde_test(test_plugin_abi18)
target_compile_definitions(test_plugin_abi18 PRIVATE
VDE_PLUGIN_DIRS="${CMAKE_BINARY_DIR}/plugins"
VDE_ABI_MATRIX_DIR="${CMAKE_BINARY_DIR}/plugin_abi_matrix")
add_dependencies(test_plugin_abi18 vde_official_ui_theme vde_official_binding_meta)
if(TARGET vde_abi_matrix_7)
add_dependencies(test_plugin_abi18 vde_abi_matrix_7)
endif()
add_vde_test(test_official_ui_theme)
target_compile_definitions(test_official_ui_theme PRIVATE
VDE_PLUGIN_DIRS="${CMAKE_BINARY_DIR}/plugins")
add_dependencies(test_official_ui_theme vde_official_ui_theme)
add_vde_test(test_official_binding_meta)
target_compile_definitions(test_official_binding_meta PRIVATE
VDE_PLUGIN_DIRS="${CMAKE_BINARY_DIR}/plugins")
add_dependencies(test_official_binding_meta vde_official_binding_meta)
# P4-44 官方 PLY binary little-endian 读写
add_vde_test(test_official_ply)
target_compile_definitions(test_official_ply PRIVATE
VDE_PLUGIN_OFFICIAL_DIR="${CMAKE_BINARY_DIR}/plugins/official")
add_dependencies(test_official_ply vde_official_ply)
# P4-50 STEP 官方插件写能力(AP203 FACETED_BREP)
add_vde_test(test_official_step_write)
target_compile_definitions(test_official_step_write PRIVATE
VDE_PLUGIN_OFFICIAL_DIR="${CMAKE_BINARY_DIR}/plugins/official")
add_dependencies(test_official_step_write vde_official_step)
# P4-52 IGES 官方插件写能力(faceted 502/504/510)
add_vde_test(test_official_iges_write)
target_compile_definitions(test_official_iges_write PRIVATE
VDE_PLUGIN_OFFICIAL_DIR="${CMAKE_BINARY_DIR}/plugins/official")
add_dependencies(test_official_iges_write vde_official_iges)
# P4-53 插件生态覆盖矩阵 + 真实 PluginManager e2e
add_vde_test(test_plugin_ecosystem)
target_compile_definitions(test_plugin_ecosystem PRIVATE
VDE_PLUGIN_OFFICIAL_DIR="${CMAKE_BINARY_DIR}/plugins/official")
add_dependencies(test_plugin_ecosystem vde_plugin_tool)
add_test(NAME VDE_PluginToolMatrixSmoke
COMMAND ${CMAKE_COMMAND}
-DVDE_PLUGIN_TOOL=$<TARGET_FILE:vde_plugin_tool>
-DVDE_PLUGIN_OFFICIAL_DIR=${CMAKE_BINARY_DIR}/plugins/official
-P "${CMAKE_CURRENT_SOURCE_DIR}/ecosystem_matrix_smoke.cmake")
# P4-45 插件 C++ header-only SDK(无插件依赖;仅编译/单元测试)
add_vde_test(test_plugin_sdk)
# P4-48: vde_plugin_tool upgrade <pkg> --root (verify + semver + atomic upgrade/rollback)
if(TARGET vde_plugin_tool)
add_test(NAME VDE_PluginToolUpgrade
COMMAND ${CMAKE_COMMAND}
"-DVDE_TOOL=$<TARGET_FILE:vde_plugin_tool>"
"-DVDE_BINARY_DIR=${CMAKE_BINARY_DIR}"
-P "${CMAKE_SOURCE_DIR}/tests/plugin/upgrade_tool_smoke.cmake")
set_tests_properties(VDE_PluginToolUpgrade PROPERTIES TIMEOUT 300)
endif()
# P4-60 / ABI 1.9:Binding options 扩展 + 旧 ABI 1.8 binding 回退夹具
set(_abi19_root "${CMAKE_BINARY_DIR}/plugins_abi19")
file(MAKE_DIRECTORY "${_abi19_root}/legacy_binding")
add_library(vde_test_abi18_legacy_binding SHARED fixtures/abi18_legacy_binding.cpp)
target_include_directories(vde_test_abi18_legacy_binding PRIVATE "${CMAKE_SOURCE_DIR}/include")
target_compile_definitions(vde_test_abi18_legacy_binding PRIVATE VDE_PLUGIN_IMPL=1)
set_target_properties(vde_test_abi18_legacy_binding PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${_abi19_root}/legacy_binding"
RUNTIME_OUTPUT_DIRECTORY "${_abi19_root}/legacy_binding"
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
LIBRARY_OUTPUT_DIRECTORY_DEBUG "${_abi19_root}/legacy_binding"
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${_abi19_root}/legacy_binding"
LIBRARY_OUTPUT_DIRECTORY_RELEASE "${_abi19_root}/legacy_binding"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${_abi19_root}/legacy_binding"
LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${_abi19_root}/legacy_binding"
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${_abi19_root}/legacy_binding"
LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL "${_abi19_root}/legacy_binding"
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${_abi19_root}/legacy_binding")
if(WIN32)
set_target_properties(vde_test_abi18_legacy_binding PROPERTIES PREFIX "")
endif()
file(WRITE "${_abi19_root}/legacy_binding/vde-plugin.json"
"{\n \"id\": \"com.vde.test.abi18.legacy_binding\",\n"
" \"version\": \"1.0.0\",\n \"kind\": \"binding\",\n"
" \"abi\": { \"major\": 1, \"minor\": 8 },\n"
" \"entry\": { \"windows\": \"vde_test_abi18_legacy_binding.dll\", "
"\"linux\": \"libvde_test_abi18_legacy_binding.so\" },\n"
" \"capabilities\": [\"binding:legacy\"]\n}\n")
add_vde_test(test_plugin_abi19)
target_compile_definitions(test_plugin_abi19 PRIVATE
VDE_PLUGIN_DIRS="${CMAKE_BINARY_DIR}/plugins"
VDE_ABI19_LEGACY_DIR="${_abi19_root}/legacy_binding")
add_dependencies(test_plugin_abi19 vde_official_binding_meta vde_test_abi18_legacy_binding)
if(TARGET vde_abi_matrix_9)
add_dependencies(test_plugin_abi19 vde_abi_matrix_9)
endif()
if(TARGET vde_abi_matrix_9)
add_dependencies(test_plugin_abi15 vde_abi_matrix_9)
endif()
# Wave 8: 插件生命周期 / 能力注册边界补测
add_vde_test(test_cov_plugin_lifecycle)