diff --git a/src/tests/end2end/SwapChainValidationTests.cpp b/src/tests/end2end/SwapChainValidationTests.cpp index b4a76d4212..e92bf847e9 100644 --- a/src/tests/end2end/SwapChainValidationTests.cpp +++ b/src/tests/end2end/SwapChainValidationTests.cpp @@ -32,7 +32,7 @@ class SwapChainValidationTests : public DawnTest { glfwSetErrorCallback([](int code, const char* message) { dawn::ErrorLog() << "GLFW error " << code << " " << message; }); - glfwInit(); + DAWN_SKIP_TEST_IF(!glfwInit()); // The SwapChainValidationTests don't create devices so we don't need to call // SetupGLFWWindowHintsForBackend. Set GLFW_NO_API anyway to avoid GLFW bringing up a GL diff --git a/src/tests/end2end/WindowSurfaceTests.cpp b/src/tests/end2end/WindowSurfaceTests.cpp index 29e4fcbed6..7bfc107fe0 100644 --- a/src/tests/end2end/WindowSurfaceTests.cpp +++ b/src/tests/end2end/WindowSurfaceTests.cpp @@ -16,6 +16,7 @@ #include "common/Platform.h" #include "dawn/dawn_proc.h" #include "dawn_native/DawnNative.h" +#include "tests/DawnTest.h" #include "utils/GLFWUtils.h" #include @@ -47,7 +48,7 @@ class WindowSurfaceInstanceTests : public testing::Test { glfwSetErrorCallback([](int code, const char* message) { dawn::ErrorLog() << "GLFW error " << code << " " << message; }); - glfwInit(); + DAWN_SKIP_TEST_IF(!glfwInit()); DawnProcTable procs = dawn_native::GetProcs(); dawnProcSetProcs(&procs);