Files
mandy/runtime/test/check_loaded_gdk.cmake
admin 0327c9d27a Resolve host module GetProcAddress names through runtime shims
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-22 18:08:14 +00:00

17 lines
918 B
CMake

# Run the run-time GDK load fixture (tiny_gdk_load) under the loader and check its verdict from outside, as
# check_loaded_async.cmake does: under Wine an exit status alone can look successful even when the guest failed.
get_filename_component(guest_dir "${GUEST}" DIRECTORY)
get_filename_component(guest_name "${GUEST}" NAME)
file(WRITE "${guest_dir}/host_shim_probe.txt" "shim")
execute_process(
COMMAND ${RUNNER} "${LOADER}" --run "${guest_name}" -- host-shim-probe
WORKING_DIRECTORY "${guest_dir}"
TIMEOUT 90
RESULT_VARIABLE code OUTPUT_VARIABLE output ERROR_VARIABLE output)
file(REMOVE "${guest_dir}/host_shim_probe.txt")
string(REPLACE "\r\n" "\n" output "${output}")
if(NOT code STREQUAL "0" OR NOT output MATCHES "(^|\n)tiny_gdk_load: PASS(\n|$)"
OR NOT output MATCHES "(^|\n)game exited with code 0(\n|$)")
message(FATAL_ERROR "Loaded GDK run-time fixture returned ${code}\n${output}")
endif()