[PATCH weston] tests: Skip buffer count test if wayland EGL extension isn't present

Derek Foreman derekf at osg.samsung.com
Tue Jan 20 11:16:26 PST 2015


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

Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
---
 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



More information about the wayland-devel mailing list