[Fix] (IntegrationTest): report the backend that actually comes up when MOBILEGL_BACKEND_TYPE is unset

HeadlessGL reported the literal "<unset>" as the backend name when the variable was
not set, while MG_ConfigLoader::InitBackendType defaults it to DirectGLES and brought
DirectGLES up. Every ctest entry sets the variable through its ENVIRONMENT property,
which is why nothing ever noticed - but run straight from an adb shell, where nothing
sets it, the name matched neither backend and every case gated on DirectGLES skipped
as though DirectGLES were not running. On an Adreno 830 that silently disabled the
gl_ViewportIndex emulation control and the DirectGLES-only attachment scenarios.
This commit is contained in:
2026-08-25 04:52:21 -04:00
parent 7f2ca68615
commit 5398fb4289
@@ -552,7 +552,15 @@ namespace MGITest {
// before the pre-flight forks - the child must measure the same platform
// the parent will use.
EnsureHeadlessPlatform();
m_backendName = EnvOr("MOBILEGL_BACKEND_TYPE", "<unset>");
// The backend that is actually about to come up, which is what every
// `BackendName() == "DirectGLES"` gate in the scenarios means by the question.
// MG_ConfigLoader::InitBackendType defaults an unset MOBILEGL_BACKEND_TYPE to
// DirectGLES, so the same default belongs here; this used to report the literal
// "<unset>" instead. Under ctest the variable is always set by the ENVIRONMENT
// property, which is why that never showed - but run straight from a device
// shell, where nothing sets it, DirectGLES came up and every case gated on the
// NAME DirectGLES skipped as though it had not.
m_backendName = EnvOr("MOBILEGL_BACKEND_TYPE", "DirectGLES");
m_usable = BringUp();
}