diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2015-01-23 12:12:36 -0600 |
---|---|---|
committer | Bryce Harrington <bryce@osg.samsung.com> | 2015-01-23 18:16:48 -0800 |
commit | 9bb133990a82899f9d8614489b88af51f9161a23 (patch) | |
tree | f38196b0b99345ec90a5d133c4e26c9e7abfdd30 | |
parent | 194ca2b2b249c1079c2f0aa7ebc0dcfece07d98a (diff) |
tests: Skip buffer count test if wl_drm isn't present
This skips the test when running on the headless backend.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
(Presumably) Reviewed-by: Daniel Stone <daniel@fooishbar.org>
-rw-r--r-- | tests/buffer-count-test.c | 3 | ||||
-rw-r--r-- | tests/weston-test-client-helper.c | 2 | ||||
-rw-r--r-- | tests/weston-test-client-helper.h | 2 |
3 files changed, 7 insertions, 0 deletions
diff --git a/tests/buffer-count-test.c b/tests/buffer-count-test.c index 5985a9e9..43fb089e 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 e21439c7..518e8990 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 2cf3d8f2..a6ea524b 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 { |