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

Bryce Harrington bryce at osg.samsung.com
Fri Jan 23 09:16:08 PST 2015


On Tue, Jan 20, 2015 at 01:16:26PM -0600, Derek Foreman wrote:
> This also skips the test when running on the headless backend.
> 
> Signed-off-by: Derek Foreman <derekf at osg.samsung.com>

Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>

(But waiting for resolution on daniels' comments to pull.)

> ---
>  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
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list