CNA-GAP-059: In a MinGW-w64 cross tree CnaTests gets a Wine CROSSCOMPILING_EMULATOR only when the default renderer is DIRECTX9/11/12 or DIRECT2D is compiled in
Evidence basis: source-verified at the pinned commit. Claims on this page were checked by reading the CNA source at commit 009d40f5; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.
For any other default renderer (for example SDL_RENDERER, the toolchain file's own usage example) gtest discovery (DISCOVERY_MODE PRE_TEST) and ctest try to execute the Windows CnaTests binary directly on the Linux host.
- Identifier
CNA-GAP-059- Category
- Functional gap
- Subsystem
- Build & CI
- Status
- Open
- Verified against
- CNA
009d40f5(009d40f5dd085c4e674d3479675fac84b12b3e0a) - Evidence basis
- Source-verified: read at TARGET, not executed
- Tests touching this area
- None
- Affected contract
- cmake/UnitTests.cmake CnaTests CROSSCOMPILING_EMULATOR chain; cross-compiled CTest runs
Expected behaviour
CNA's comment above the chain says a cross-compiled CnaTests.exe needs a Wine wrapper, "or every ctest invocation in this build tree fails outright trying to exec a Windows PE natively on the Linux host".
Actual behaviour at TARGET
Inside if(CMAKE_CROSSCOMPILING), UnitTests.cmake sets CROSSCOMPILING_EMULATOR only for a DIRECTX9, DIRECTX11 or DIRECTX12 default, or when DIRECT2D is in CNA_RENDERER_IDENTITIES. Any other default - including SDL_RENDERER, which mingw-w64.cmake uses in its own usage example - gets no emulator, while CNA_BUILD_TESTS defaults to ON.
Source locations
cmake/UnitTests.cmake— CROSSCOMPILING_EMULATOR chain before gtest_discover_tests(CnaTests)cmake/toolchains/mingw-w64.cmake— usage example with -DCNA_GRAPHICS_RENDERER=SDL_RENDERER
Evidence
Checked by reading the named sources at 009d40f5; nothing was built or executed for this entry. Whether a host silently succeeds depends on binfmt_misc handing PE files to Wine; on a host without that, the result follows from the missing property.
Focused reproduction
No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.
Current tests
No workflow cross-compiles CnaTests with a non-Direct3D default.
Regression test
A generic Wine emulator fallback for every other default (or a configure warning), plus a configure-only CI check of a MinGW SDL_RENDERER tree with tests on.
Blast radius
Linux-hosted MinGW cross builds with tests enabled and a non-Direct3D default renderer. Direct3D and Direct2D cross trees, and native builds, are unaffected.
Workaround
Configure with -DCNA_BUILD_TESTS=OFF, or set CMAKE_CROSSCOMPILING_EMULATOR to a Wine wrapper yourself.
Related pages
The same subject is explained at several altitudes. These are the neighbouring pages at each one.
- Internals
- Testing architecture: test discovery
- Known issues
- Functional gap index