forked from enlightenment/efl
Revert "tests/ecore_wl2: Reduce calls to ecore_wl2_display_connect"
Reverting this as it causes tests to stall (essentially 'meson test
ecore_wl2-suite' just hangs) when run inside a compositor.
This reverts commit a526285db4
.
This commit is contained in:
parent
a526285db4
commit
1b20f789dc
|
@ -10,13 +10,12 @@
|
|||
|
||||
#include "ecore_wl2_suite.h"
|
||||
|
||||
static Ecore_Wl2_Display *disp;
|
||||
|
||||
static Ecore_Wl2_Display *
|
||||
_display_connect(void)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
|
||||
disp = ecore_wl2_display_connect(NULL);
|
||||
ck_assert(disp != NULL);
|
||||
return disp;
|
||||
}
|
||||
|
||||
|
@ -31,8 +30,12 @@ _window_create(Ecore_Wl2_Display *disp)
|
|||
|
||||
EFL_START_TEST(wl2_window_new)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
Ecore_Wl2_Window *win;
|
||||
|
||||
disp = _display_connect();
|
||||
ck_assert(disp != NULL);
|
||||
|
||||
win = _window_create(disp);
|
||||
ck_assert(win != NULL);
|
||||
}
|
||||
|
@ -40,10 +43,14 @@ EFL_END_TEST
|
|||
|
||||
EFL_START_TEST(wl2_window_surface_test)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
Ecore_Wl2_Window *win;
|
||||
struct wl_surface *surf;
|
||||
int id = -1;
|
||||
|
||||
disp = _display_connect();
|
||||
ck_assert(disp != NULL);
|
||||
|
||||
win = _window_create(disp);
|
||||
ck_assert(win != NULL);
|
||||
|
||||
|
@ -59,9 +66,13 @@ EFL_END_TEST
|
|||
|
||||
EFL_START_TEST(wl2_window_rotation_get)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
Ecore_Wl2_Window *win;
|
||||
int rot = -1;
|
||||
|
||||
disp = _display_connect();
|
||||
ck_assert(disp != NULL);
|
||||
|
||||
win = _window_create(disp);
|
||||
ck_assert(win != NULL);
|
||||
|
||||
|
@ -72,9 +83,13 @@ EFL_END_TEST
|
|||
|
||||
EFL_START_TEST(wl2_window_output_find)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
Ecore_Wl2_Window *win;
|
||||
Ecore_Wl2_Output *out;
|
||||
|
||||
disp = _display_connect();
|
||||
ck_assert(disp != NULL);
|
||||
|
||||
win = _window_create(disp);
|
||||
ck_assert(win != NULL);
|
||||
|
||||
|
@ -85,9 +100,13 @@ EFL_END_TEST
|
|||
|
||||
EFL_START_TEST(wl2_window_aux_hints_supported_get)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
Ecore_Wl2_Window *win;
|
||||
Eina_List *l;
|
||||
|
||||
disp = _display_connect();
|
||||
ck_assert(disp != NULL);
|
||||
|
||||
win = _window_create(disp);
|
||||
ck_assert(win != NULL);
|
||||
|
||||
|
@ -98,8 +117,12 @@ EFL_END_TEST
|
|||
|
||||
EFL_START_TEST(wl2_window_display_get)
|
||||
{
|
||||
Ecore_Wl2_Display *disp;
|
||||
Ecore_Wl2_Window *win;
|
||||
|
||||
disp = _display_connect();
|
||||
ck_assert(disp != NULL);
|
||||
|
||||
win = _window_create(disp);
|
||||
ck_assert(win != NULL);
|
||||
|
||||
|
@ -112,8 +135,6 @@ ecore_wl2_test_window(TCase *tc)
|
|||
{
|
||||
if (getenv("WAYLAND_DISPLAY"))
|
||||
{
|
||||
disp = _display_connect();
|
||||
|
||||
/* window tests can only run if there is an existing compositor */
|
||||
tcase_add_test(tc, wl2_window_new);
|
||||
tcase_add_test(tc, wl2_window_surface_test);
|
||||
|
@ -121,7 +142,5 @@ ecore_wl2_test_window(TCase *tc)
|
|||
tcase_add_test(tc, wl2_window_output_find);
|
||||
tcase_add_test(tc, wl2_window_aux_hints_supported_get);
|
||||
tcase_add_test(tc, wl2_window_display_get);
|
||||
|
||||
ecore_wl2_display_disconnect(disp);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue