[PATCH v2 weston] tests: Skip buffer count test if wl_drm isn't present
Bryce Harrington
bryce at osg.samsung.com
Fri Jan 23 18:19:03 PST 2015
On Fri, Jan 23, 2015 at 12:12:36PM -0600, Derek Foreman wrote:
> This skips the test when running on the headless backend.
>
> Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
Derek says Daniel is good with this solution, and it LGTM, so applied,
thanks.
194ca2b..9bb1339 master -> master
> ---
> tests/buffer-count-test.c | 3 +++
> tests/weston-test-client-helper.c | 2 ++
> tests/weston-test-client-helper.h | 2 ++
> 3 files changed, 7 insertions(+)
>
> diff --git a/tests/buffer-count-test.c b/tests/buffer-count-test.c
> index 5985a9e..43fb089 100644
> --- a/tests/buffer-count-test.c
> +++ b/tests/buffer-count-test.c
> @@ -123,6 +123,9 @@ TEST(test_buffer_count)
> int i;
>
> test_data.client = client_create(10, 10, 10, 10);
> + if (!test_data.client->has_wl_drm)
> + skip("compositor has not bound its display to EGL\n");
> +
> if (init_egl(&test_data) < 0)
> skip("could not initialize egl, "
> "possibly using the headless backend\n");
> diff --git a/tests/weston-test-client-helper.c b/tests/weston-test-client-helper.c
> index e21439c..518e899 100644
> --- a/tests/weston-test-client-helper.c
> +++ b/tests/weston-test-client-helper.c
> @@ -482,6 +482,8 @@ handle_global(void *data, struct wl_registry *registry,
> &wl_test_interface, 1);
> wl_test_add_listener(test->wl_test, &test_listener, test);
> client->test = test;
> + } else if (strcmp(interface, "wl_drm") == 0) {
> + client->has_wl_drm = true;
> }
> }
>
> diff --git a/tests/weston-test-client-helper.h b/tests/weston-test-client-helper.h
> index 2cf3d8f..a6ea524 100644
> --- a/tests/weston-test-client-helper.h
> +++ b/tests/weston-test-client-helper.h
> @@ -26,6 +26,7 @@
> #include "config.h"
>
> #include <assert.h>
> +#include <stdbool.h>
> #include "weston-test-runner.h"
> #include "wayland-test-client-protocol.h"
>
> @@ -40,6 +41,7 @@ struct client {
> struct surface *surface;
> int has_argb;
> struct wl_list global_list;
> + bool has_wl_drm;
> };
>
> struct global {
> --
> 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