feat: Add gRPC support for ImGuiTestHarness

- Integrated gRPC service for automated GUI testing in ImGuiTestHarness.
- Implemented service methods: Ping, Click, Type, Wait, Assert, and Screenshot.
- Created proto definitions for the gRPC service and messages.
- Added server lifecycle management for the gRPC server.
- Included necessary dependencies and build configurations in CMake.
This commit is contained in:
scawful
2025-10-01 22:45:07 -04:00
parent defdb3ea32
commit 3d272605c1
8 changed files with 737 additions and 26 deletions

View File

@@ -219,3 +219,26 @@ if(NOT APPLE)
endif()
endif()
# ============================================================================
# Optional gRPC Support for ImGuiTestHarness
# ============================================================================
if(YAZE_WITH_GRPC)
message(STATUS "Adding gRPC ImGuiTestHarness to yaze target")
# Generate C++ code from .proto using the helper function from cmake/grpc.cmake
target_add_protobuf(yaze
${CMAKE_SOURCE_DIR}/src/app/core/proto/imgui_test_harness.proto)
# Add service implementation sources
target_sources(yaze PRIVATE
${CMAKE_SOURCE_DIR}/src/app/core/imgui_test_harness_service.cc
${CMAKE_SOURCE_DIR}/src/app/core/imgui_test_harness_service.h)
# Link gRPC libraries
target_link_libraries(yaze PRIVATE
grpc++
grpc++_reflection
libprotobuf)
message(STATUS "✓ gRPC ImGuiTestHarness integrated")
endif()