Ecore tests: REMOVE wayland tests.
authorTom Hacohen <tom@stosb.com>
Fri, 8 May 2015 15:17:05 +0000 (16:17 +0100)
committerTom Hacohen <tom@stosb.com>
Fri, 8 May 2015 15:18:36 +0000 (16:18 +0100)
These tests aren't really testing anything, and are just broken and annoying.
They only test init and shutdown, and they require a running wayland compositor.

They fail for anyone that has wayland enabled but not running in a wayland session.

They should be brought back once they actual test something, or once we allow skipping
tests that can't be run due to environment issues.

src/Makefile_Ecore.am
src/tests/ecore/ecore_suite.c
src/tests/ecore/ecore_suite.h
src/tests/ecore/ecore_test_ecore_wayland.c [deleted file]

index 738f929..b7e0b6b 100644 (file)
@@ -245,10 +245,6 @@ if HAVE_ECORE_AUDIO
 tests_ecore_ecore_suite_SOURCES += tests/ecore/ecore_test_ecore_audio.c
 endif
 
-if HAVE_ECORE_WAYLAND
-tests_ecore_ecore_suite_SOURCES += tests/ecore/ecore_test_ecore_wayland.c
-endif
-
 if HAVE_ECORE_DRM
 tests_ecore_ecore_suite_SOURCES += tests/ecore/ecore_test_ecore_drm.c
 endif
index 898f471..ce75f00 100644 (file)
@@ -30,9 +30,6 @@ static const Ecore_Test_Case etc[] = {
   { "Ecore_Evas", ecore_test_ecore_evas },
   { "Ecore_Animators", ecore_test_animator },
   { "Ecore_Test_Ccore_Thread_Eina_Thread_Queue", ecore_test_ecore_thread_eina_thread_queue },
-#if HAVE_ECORE_WAYLAND
-  { "Ecore_Wayland", ecore_test_ecore_wayland },
-#endif
 #if HAVE_ECORE_DRM
   { "Ecore_Drm", ecore_test_ecore_drm },
 #endif
index e6dd4b3..f0e4c2a 100644 (file)
@@ -11,7 +11,6 @@ void ecore_test_timer(TCase *tc);
 void ecore_test_ecore_evas(TCase *tc);
 void ecore_test_animator(TCase *tc);
 void ecore_test_ecore_thread_eina_thread_queue(TCase *tc);
-void ecore_test_ecore_wayland(TCase *tc);
 void ecore_test_ecore_drm(TCase *tc);
 void ecore_test_ecore_fb(TCase *tc);
 void ecore_test_ecore_input(TCase *tc);
diff --git a/src/tests/ecore/ecore_test_ecore_wayland.c b/src/tests/ecore/ecore_test_ecore_wayland.c
deleted file mode 100644 (file)
index 90fda73..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-#include <unistd.h>
-
-#include <Ecore_Wayland.h>
-
-#include "ecore_suite.h"
-#include "wayland-server.h"
-
-#define MAX_ITER 10
-
-static char test_socket[] = "test1";
-
-START_TEST(ecore_test_ecore_wl_shutdown_bef_init)
-{
-   struct wl_display *test_display = NULL;
-   int ret = 0;
-
-   ret = ecore_wl_shutdown();
-   fprintf(stderr, "Calling ecore_wl_shutdown without calling ecore_wl_init\n");
-   fail_if(ret != 0);
-
-   test_display = wl_display_create();
-   fprintf(stderr, "Creating wayland display\n");
-   fail_if(test_display == NULL);
-
-   ret = wl_display_add_socket(test_display, test_socket);
-   fprintf(stderr, "Connecting %s socket to wayland display\n", test_socket);
-   fail_if(ret != 0);
-
-   ret = ecore_wl_init(test_socket);
-   fprintf(stderr, "Calling ecore_wl_init with %s\n", test_socket);
-   fail_if(ret != 1);
-
-   ret = ecore_wl_shutdown();
-   fprintf(stderr, "Calling ecore_wl_shutdown after ecore_wl_init.\n");
-   fail_if(ret != 0);
-
-   wl_display_destroy(test_display);
-}
-END_TEST
-
-START_TEST(ecore_test_ecore_wl_init_name)
-{
-   struct wl_display *test_display = NULL;
-   int ret = 0, i, j;
-
-   test_display = wl_display_create();
-   fprintf(stderr, "Creating display\n");
-   fail_if(test_display == NULL);
-
-   ret = wl_display_add_socket(test_display, test_socket);
-   fprintf(stderr, "Connecting socket to display\n");
-   fail_if(ret != 0);
-
-   for (i = 1; i <= MAX_ITER; i++)
-     {
-        ret = ecore_wl_init(test_socket);
-        fprintf(stderr, "Created %d ecore wayland instance.\n", i);
-        fail_if(ret != i);
-     }
-
-   for (j = MAX_ITER - 1; j >= 0; j--)
-     {
-        ret = ecore_wl_shutdown();
-        fprintf(stderr, "Deleted %d ecore wayland instance.\n", MAX_ITER - j);
-        fail_if(ret != j);
-     }
-
-   wl_display_destroy(test_display);
-}
-END_TEST
-
-START_TEST(ecore_test_ecore_wl_init)
-{
-#define PATH_LEN  128
-   struct wl_display *test_display = NULL;
-   int ret, i, j, run_test = 0;
-   char *wayland_display = NULL, *xdg_runtime_dir = NULL, path[PATH_LEN];
-
-   xdg_runtime_dir = getenv("XDG_RUNTIME_DIR");
-   if (xdg_runtime_dir)
-     {
-        wayland_display = getenv("WAYLAND_DISPLAY");
-        if (!wayland_display)
-          wayland_display = "wayland-0";
-
-        snprintf(path, PATH_LEN, "%s/%s", xdg_runtime_dir, wayland_display);
-        if (access(path, F_OK) != -1)
-          {
-             run_test = 1;
-          }
-        else
-          {
-             test_display = wl_display_create();
-             fprintf(stderr, "Creating display\n");
-             fail_if(test_display == NULL);
-
-             ret = wl_display_add_socket(test_display, NULL);
-             fprintf(stderr, "Connecting socket to display\n");
-             fail_if(ret != 0);
-
-             run_test = 1;
-          }
-     }
-
-   if (run_test)
-     {
-        for (i = 1; i <= MAX_ITER; i++)
-          {
-             ret = ecore_wl_init(NULL);
-             fprintf(stderr, "Created %d ecore wayland instance.\n", i);
-             fail_if(ret != i);
-          }
-
-        for (j = MAX_ITER - 1; j >= 0; j--)
-          {
-             ret = ecore_wl_shutdown();
-             fprintf(stderr, "Deleted %d ecore wayland instance.\n", MAX_ITER - j);
-             fail_if(ret != j);
-          }
-     }
-}
-END_TEST
-
-void ecore_test_ecore_wayland(TCase *tc)
-{
-   tcase_add_test(tc, ecore_test_ecore_wl_init);
-   tcase_add_test(tc, ecore_test_ecore_wl_init_name);
-   tcase_add_test(tc, ecore_test_ecore_wl_shutdown_bef_init);
-}