mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-06 13:48:21 +02:00
tests: Skip udmabuf tests before initializing client
We currently leak resources and hit asserts if dmabuf is unavailable. Move the check to before we initialize anything. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
35527e6eed
commit
fc7bb13bbb
1 changed files with 6 additions and 3 deletions
|
|
@ -252,6 +252,8 @@ TEST(simple_shot)
|
|||
struct capturer *capt;
|
||||
struct buffer *buf;
|
||||
|
||||
SKIP_NO_UDMABUF(fix->buffer_type);
|
||||
|
||||
client = create_client();
|
||||
capt = capturer_create(client, client->output,
|
||||
WESTON_CAPTURE_V1_SOURCE_FRAMEBUFFER);
|
||||
|
|
@ -266,7 +268,6 @@ TEST(simple_shot)
|
|||
test_assert_int_gt(capt->height, 0);
|
||||
test_assert_false(capt->events.reply);
|
||||
|
||||
SKIP_NO_UDMABUF(fix->buffer_type);
|
||||
buf = create_buffer(client, capt->width, capt->height,
|
||||
fix->expected_drm_format, fix->buffer_type);
|
||||
|
||||
|
|
@ -296,6 +297,8 @@ TEST(retry_on_wrong_format)
|
|||
struct capturer *capt;
|
||||
struct buffer *buf;
|
||||
|
||||
SKIP_NO_UDMABUF(fix->buffer_type);
|
||||
|
||||
client = create_client();
|
||||
capt = capturer_create(client, client->output,
|
||||
WESTON_CAPTURE_V1_SOURCE_FRAMEBUFFER);
|
||||
|
|
@ -313,7 +316,6 @@ TEST(retry_on_wrong_format)
|
|||
test_assert_int_gt(capt->height, 0);
|
||||
test_assert_false(capt->events.reply);
|
||||
|
||||
SKIP_NO_UDMABUF(fix->buffer_type);
|
||||
buf = create_buffer(client, capt->width, capt->height,
|
||||
drm_format, fix->buffer_type);
|
||||
|
||||
|
|
@ -342,6 +344,8 @@ TEST(retry_on_wrong_size)
|
|||
struct capturer *capt;
|
||||
struct buffer *buf;
|
||||
|
||||
SKIP_NO_UDMABUF(fix->buffer_type);
|
||||
|
||||
client = create_client();
|
||||
capt = capturer_create(client, client->output,
|
||||
WESTON_CAPTURE_V1_SOURCE_FRAMEBUFFER);
|
||||
|
|
@ -355,7 +359,6 @@ TEST(retry_on_wrong_size)
|
|||
test_assert_int_gt(capt->height, 5);
|
||||
test_assert_false(capt->events.reply);
|
||||
|
||||
SKIP_NO_UDMABUF(fix->buffer_type);
|
||||
buf = create_buffer(client, capt->width - 3, capt->height - 3,
|
||||
fix->expected_drm_format, fix->buffer_type);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue