From 3cfdfe30b22cc34088a8da5e4e59b5dd0c8c76a8 Mon Sep 17 00:00:00 2001 From: "systems-assistant[bot]" <221163467+systems-assistant[bot]@users.noreply.github.com> Date: Fri, 19 Sep 2025 22:51:55 +0100 Subject: [PATCH] SWDEV-544502 - Skip opengl tests on devices with no image support (#542) Co-authored-by: Ioannis Assiouras --- .../catch/unit/gl_interop/gl_interop_common.hh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/projects/hip-tests/catch/unit/gl_interop/gl_interop_common.hh b/projects/hip-tests/catch/unit/gl_interop/gl_interop_common.hh index 160a01f3d8..54692d1bed 100644 --- a/projects/hip-tests/catch/unit/gl_interop/gl_interop_common.hh +++ b/projects/hip-tests/catch/unit/gl_interop/gl_interop_common.hh @@ -126,11 +126,6 @@ class EGLContextScopeGuard { public: EGLContextScopeGuard() { - if(!HipTest::isImageSupported()) { - HipTest::HIP_SKIP_TEST("Image is not supported on the device. Skipped."); - exit(1); - } - // 1. Initialize EGL PFNEGLQUERYDEVICESEXTPROC eglQueryDevicesEXT = (PFNEGLQUERYDEVICESEXTPROC)eglGetProcAddress("eglQueryDevicesEXT"); @@ -214,6 +209,12 @@ class GLContextScopeGuard { static constexpr char kEnvarName[] = "GL_CONTEXT_TYPE"; GLContextScopeGuard() { + + if(!HipTest::isImageSupported()) { + HipTest::HIP_SKIP_TEST("Image is not supported on the device. Skipped."); + exit(0); + } + char* val = std::getenv(kEnvarName); std::string val_str = val == NULL ? "" : val;