Ecore tests: REMOVE wayland tests.

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.
This commit is contained in:
Tom Hacohen 2015-05-08 16:17:05 +01:00
parent 7072ca435a
commit a00bbffd3f
4 changed files with 0 additions and 142 deletions

View 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

View 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

View 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);

View File

@ -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);
}