diff options
Diffstat (limited to 'tests/weston-test-client-helper.c')
-rw-r--r-- | tests/weston-test-client-helper.c | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/tests/weston-test-client-helper.c b/tests/weston-test-client-helper.c index b19be400..399aa443 100644 --- a/tests/weston-test-client-helper.c +++ b/tests/weston-test-client-helper.c @@ -111,6 +111,17 @@ move_client(struct client *client, int x, int y) frame_callback_wait(client, &done); } +int +get_n_egl_buffers(struct client *client) +{ + client->test->n_egl_buffers = -1; + + wl_test_get_n_egl_buffers(client->test->wl_test); + wl_display_roundtrip(client->wl_display); + + return client->test->n_egl_buffers; +} + static void pointer_handle_enter(void *data, struct wl_pointer *wl_pointer, uint32_t serial, struct wl_surface *wl_surface, @@ -340,8 +351,17 @@ test_handle_pointer_position(void *data, struct wl_test *wl_test, test->pointer_x, test->pointer_y); } +static void +test_handle_n_egl_buffers(void *data, struct wl_test *wl_test, uint32_t n) +{ + struct test *test = data; + + test->n_egl_buffers = n; +} + static const struct wl_test_listener test_listener = { - test_handle_pointer_position + test_handle_pointer_position, + test_handle_n_egl_buffers, }; static void @@ -476,6 +496,20 @@ static const struct wl_registry_listener registry_listener = { handle_global }; +void +skip(const char *fmt, ...) +{ + va_list argp; + + va_start(argp, fmt); + vfprintf(stderr, fmt, argp); + va_end(argp); + + /* automake tests uses exit code 77, but we don't have a good + * way to make weston exit with that from here. */ + exit(0); +} + static void log_handler(const char *fmt, va_list args) { |