File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
projects/hip-tests/catch/unit/gl_interop Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -126,11 +126,6 @@ class EGLContextScopeGuard {
126126 public:
127127 EGLContextScopeGuard () {
128128
129- if (!HipTest::isImageSupported ()) {
130- HipTest::HIP_SKIP_TEST (" Image is not supported on the device. Skipped." );
131- exit (1 );
132- }
133-
134129 // 1. Initialize EGL
135130 PFNEGLQUERYDEVICESEXTPROC eglQueryDevicesEXT =
136131 (PFNEGLQUERYDEVICESEXTPROC)eglGetProcAddress (" eglQueryDevicesEXT" );
@@ -214,6 +209,12 @@ class GLContextScopeGuard {
214209 static constexpr char kEnvarName [] = " GL_CONTEXT_TYPE" ;
215210
216211 GLContextScopeGuard () {
212+
213+ if (!HipTest::isImageSupported ()) {
214+ HipTest::HIP_SKIP_TEST (" Image is not supported on the device. Skipped." );
215+ exit (0 );
216+ }
217+
217218 char * val = std::getenv (kEnvarName );
218219 std::string val_str = val == NULL ? " " : val;
219220
You can’t perform that action at this time.
0 commit comments