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>
dev
Derek Foreman 10 years ago committed by Bryce Harrington
parent 194ca2b2b2
commit 9bb133990a
  1. 3
      tests/buffer-count-test.c
  2. 2
      tests/weston-test-client-helper.c
  3. 2
      tests/weston-test-client-helper.h

@ -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");

@ -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;
}
}

@ -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 {

Loading…
Cancel
Save