devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=1b20f789dc05a331353d7bcf024827df6b554e23
commit 1b20f789dc05a331353d7bcf024827df6b554e23 Author: Christopher Michael <[email protected]> Date: Mon Jul 22 10:05:27 2019 -0400 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 a526285db4dd281148a8d4ffd347bbc2dec881e3. --- src/tests/ecore_wl2/ecore_wl2_test_window.c | 33 +++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/src/tests/ecore_wl2/ecore_wl2_test_window.c b/src/tests/ecore_wl2/ecore_wl2_test_window.c index 88c4f7b652..3f5e98cd50 100644 --- a/src/tests/ecore_wl2/ecore_wl2_test_window.c +++ b/src/tests/ecore_wl2/ecore_wl2_test_window.c @@ -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); } } --
