ci: engine tests use dllexport-consistent macros on Windows; run Linux tests under Xvfb

- make_oakengine_gtest embeds oakengine-obj; test code must see
  OAKENGINE_API as dllexport too (OAKENGINE_BUILD), otherwise MinGW
  resolves nothing against __imp_* stubs
- the render worker intentionally drops QT_QPA_PLATFORM=offscreen and
  needs a real display for its GL context; run the Linux ctest and the
  filtered gtest steps under xvfb-run
This commit is contained in:
2026-08-03 13:32:18 +08:00
parent 631f9e5bd1
commit 1af7ab7838
2 changed files with 13 additions and 6 deletions
+6
View File
@@ -309,6 +309,12 @@ if (BUILD_TESTS)
if (UNIX AND NOT APPLE)
target_link_options(${name} PRIVATE "LINKER:--export-dynamic")
endif ()
if (WIN32)
# The test embeds oakengine-obj; its OAKENGINE_API references must
# match the library side (dllexport), otherwise MinGW looks for
# __imp_* import stubs that only a real DLL import lib provides.
target_compile_definitions(${name} PRIVATE OAKENGINE_BUILD)
endif ()
# Freshly linked binaries can exceed the 5s default discovery
# timeout on first run (dyld cold cache + Qt/OCIO init)
if (WIN32)