This also skips the test when running on the headless backend.

Signed-off-by: Derek Foreman <[email protected]>
---
 tests/buffer-count-test.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/buffer-count-test.c b/tests/buffer-count-test.c
index 5985a9e..3dd6e1a 100644
--- a/tests/buffer-count-test.c
+++ b/tests/buffer-count-test.c
@@ -65,6 +65,7 @@ init_egl(struct test_data *test_data)
 
        EGLint major, minor, n;
        EGLBoolean ret;
+       const char *extensions;
 
        test_data->egl_dpy = eglGetDisplay((EGLNativeDisplayType)
                                           test_data->client->wl_display);
@@ -87,6 +88,10 @@ init_egl(struct test_data *test_data)
        if (!test_data->egl_ctx)
                fail("eglCreateContext");
 
+       extensions = eglQueryString(test_data->egl_dpy, EGL_EXTENSIONS);
+       if (strstr(extensions, "EGL_WL_bind_wayland_display") == NULL)
+               skip("Wayland extensions not present.\n");
+
        native_window =
                wl_egl_window_create(surface->wl_surface,
                                     surface->width,
-- 
2.1.4

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to