summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile_Ecore.am9
-rw-r--r--src/Makefile_Ecore_Con.am35
-rw-r--r--src/tests/ecore/ecore_suite.c2
-rw-r--r--src/tests/ecore/ecore_suite.h2
-rw-r--r--src/tests/ecore_con/ecore_con_suite.c106
-rw-r--r--src/tests/ecore_con/ecore_con_suite.h9
-rw-r--r--src/tests/ecore_con/ecore_con_test_ecore_con.c (renamed from src/tests/ecore/ecore_test_ecore_con.c)195
-rw-r--r--src/tests/ecore_con/ecore_con_test_ecore_con_url.c (renamed from src/tests/ecore/ecore_test_ecore_con_url.c)4
-rw-r--r--src/tests/ecore_con/server.key (renamed from src/tests/ecore/server.key)0
-rw-r--r--src/tests/ecore_con/server.pem (renamed from src/tests/ecore/server.pem)0
10 files changed, 251 insertions, 111 deletions
diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am
index 2fff416..738f929 100644
--- a/src/Makefile_Ecore.am
+++ b/src/Makefile_Ecore.am
@@ -187,8 +187,6 @@ TESTS += tests/ecore/ecore_suite
187tests_ecore_ecore_suite_SOURCES = \ 187tests_ecore_ecore_suite_SOURCES = \
188tests/ecore/ecore_suite.c \ 188tests/ecore/ecore_suite.c \
189tests/ecore/ecore_test_ecore.c \ 189tests/ecore/ecore_test_ecore.c \
190tests/ecore/ecore_test_ecore_con.c \
191tests/ecore/ecore_test_ecore_con_url.c \
192tests/ecore/ecore_test_ecore_imf.c \ 190tests/ecore/ecore_test_ecore_imf.c \
193tests/ecore/ecore_test_timer.c \ 191tests/ecore/ecore_test_timer.c \
194tests/ecore/ecore_test_ecore_evas.c \ 192tests/ecore/ecore_test_ecore_evas.c \
@@ -204,7 +202,6 @@ tests_ecore_ecore_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
204@CHECK_CFLAGS@ \ 202@CHECK_CFLAGS@ \
205@ECORE_CFLAGS@ \ 203@ECORE_CFLAGS@ \
206@ECORE_AUDIO_CFLAGS@ \ 204@ECORE_AUDIO_CFLAGS@ \
207@ECORE_CON_CFLAGS@ \
208@ECORE_FILE_CFLAGS@ \ 205@ECORE_FILE_CFLAGS@ \
209@ECORE_X_CFLAGS@ \ 206@ECORE_X_CFLAGS@ \
210@ECORE_IMF_CFLAGS@ \ 207@ECORE_IMF_CFLAGS@ \
@@ -219,7 +216,6 @@ tests_ecore_ecore_suite_LDADD = \
219@CHECK_LIBS@ \ 216@CHECK_LIBS@ \
220@USE_ECORE_LIBS@ \ 217@USE_ECORE_LIBS@ \
221@USE_ECORE_AUDIO_LIBS@ \ 218@USE_ECORE_AUDIO_LIBS@ \
222@USE_ECORE_CON_LIBS@ \
223@USE_ECORE_FILE_LIBS@ \ 219@USE_ECORE_FILE_LIBS@ \
224@USE_ECORE_X_LIBS@ \ 220@USE_ECORE_X_LIBS@ \
225@USE_ECORE_IMF_LIBS@ \ 221@USE_ECORE_IMF_LIBS@ \
@@ -232,7 +228,6 @@ tests_ecore_ecore_suite_LDADD = \
232tests_ecore_ecore_suite_DEPENDENCIES = \ 228tests_ecore_ecore_suite_DEPENDENCIES = \
233@USE_ECORE_INTERNAL_LIBS@ \ 229@USE_ECORE_INTERNAL_LIBS@ \
234@USE_ECORE_AUDIO_INTERNAL_LIBS@ \ 230@USE_ECORE_AUDIO_INTERNAL_LIBS@ \
235@USE_ECORE_CON_INTERNAL_LIBS@ \
236@USE_ECORE_FILE_INTERNAL_LIBS@ \ 231@USE_ECORE_FILE_INTERNAL_LIBS@ \
237@USE_ECORE_X_INTERNAL_LIBS@ \ 232@USE_ECORE_X_INTERNAL_LIBS@ \
238@USE_ECORE_IMF_INTERNAL_LIBS@ \ 233@USE_ECORE_IMF_INTERNAL_LIBS@ \
@@ -266,9 +261,7 @@ endif
266 261
267EXTRA_DIST += \ 262EXTRA_DIST += \
268tests/ecore/modem.wav \ 263tests/ecore/modem.wav \
269tests/ecore/sms.ogg \ 264tests/ecore/sms.ogg
270tests/ecore/server.key \
271tests/ecore/server.pem
272 265
273if HAVE_ELUA 266if HAVE_ELUA
274 267
diff --git a/src/Makefile_Ecore_Con.am b/src/Makefile_Ecore_Con.am
index e482ca4..1b063d0 100644
--- a/src/Makefile_Ecore_Con.am
+++ b/src/Makefile_Ecore_Con.am
@@ -69,6 +69,41 @@ lib_ecore_con_libecore_con_la_LIBADD = @ECORE_CON_LIBS@ @EVIL_LIBS@
69lib_ecore_con_libecore_con_la_DEPENDENCIES = @ECORE_CON_INTERNAL_LIBS@ 69lib_ecore_con_libecore_con_la_DEPENDENCIES = @ECORE_CON_INTERNAL_LIBS@
70lib_ecore_con_libecore_con_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@ 70lib_ecore_con_libecore_con_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
71 71
72### Unit tests
73
74if EFL_ENABLE_TESTS
75
76check_PROGRAMS += tests/ecore_con/ecore_con_suite
77TESTS += tests/ecore_con/ecore_con_suite
78
79tests_ecore_con_ecore_con_suite_SOURCES = \
80tests/ecore_con/ecore_con_suite.c \
81tests/ecore_con/ecore_con_test_ecore_con.c \
82tests/ecore_con/ecore_con_test_ecore_con_url.c \
83tests/ecore_con/ecore_con_suite.h
84
85tests_ecore_con_ecore_con_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
86-DTESTS_SRC_DIR=\"$(top_srcdir)/src/tests/ecore_con\" \
87-DTESTS_BUILD_DIR=\"$(top_builddir)/src/tests/ecore_con\" \
88@CHECK_CFLAGS@ \
89@ECORE_CFLAGS@ \
90@ECORE_CON_CFLAGS@
91
92tests_ecore_con_ecore_con_suite_LDADD = \
93@CHECK_LIBS@ \
94@USE_ECORE_LIBS@ \
95@USE_ECORE_CON_LIBS@
96
97tests_ecore_con_ecore_con_suite_DEPENDENCIES = \
98@USE_ECORE_INTERNAL_LIBS@ \
99@USE_ECORE_CON_INTERNAL_LIBS@
100
101EXTRA_DIST += \
102tests/ecore_con/server.key \
103tests/ecore_con/server.pem
104
105endif
106
72if HAVE_ELUA 107if HAVE_ELUA
73 108
74ecore_con_eolian_lua = $(ecore_con_eolian_files:%.eo=%.eo.lua) 109ecore_con_eolian_lua = $(ecore_con_eolian_files:%.eo=%.eo.lua)
diff --git a/src/tests/ecore/ecore_suite.c b/src/tests/ecore/ecore_suite.c
index e3804a5..898f471 100644
--- a/src/tests/ecore/ecore_suite.c
+++ b/src/tests/ecore/ecore_suite.c
@@ -19,8 +19,6 @@ struct _Ecore_Test_Case
19 19
20static const Ecore_Test_Case etc[] = { 20static const Ecore_Test_Case etc[] = {
21 { "Ecore", ecore_test_ecore }, 21 { "Ecore", ecore_test_ecore },
22 { "Ecore_Con", ecore_test_ecore_con },
23 { "Ecore_Con_Url", ecore_test_ecore_con_url },
24#if HAVE_ECORE_X 22#if HAVE_ECORE_X
25 { "Ecore_X", ecore_test_ecore_x }, 23 { "Ecore_X", ecore_test_ecore_x },
26#endif 24#endif
diff --git a/src/tests/ecore/ecore_suite.h b/src/tests/ecore/ecore_suite.h
index 11e101d..e6dd4b3 100644
--- a/src/tests/ecore/ecore_suite.h
+++ b/src/tests/ecore/ecore_suite.h
@@ -4,8 +4,6 @@
4#include <check.h> 4#include <check.h>
5 5
6void ecore_test_ecore(TCase *tc); 6void ecore_test_ecore(TCase *tc);
7void ecore_test_ecore_con(TCase *tc);
8void ecore_test_ecore_con_url(TCase *tc);
9void ecore_test_ecore_x(TCase *tc); 7void ecore_test_ecore_x(TCase *tc);
10void ecore_test_ecore_imf(TCase *tc); 8void ecore_test_ecore_imf(TCase *tc);
11void ecore_test_ecore_audio(TCase *tc); 9void ecore_test_ecore_audio(TCase *tc);
diff --git a/src/tests/ecore_con/ecore_con_suite.c b/src/tests/ecore_con/ecore_con_suite.c
new file mode 100644
index 0000000..b695873
--- /dev/null
+++ b/src/tests/ecore_con/ecore_con_suite.c
@@ -0,0 +1,106 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <stdlib.h>
6#include <stdio.h>
7
8#include "Ecore.h"
9
10#include "ecore_con_suite.h"
11
12typedef struct _Ecore_Con_Test_Case Ecore_Con_Test_Case;
13
14struct _Ecore_Con_Test_Case
15{
16 const char *test_case;
17 void (*build)(TCase *tc);
18};
19
20static const Ecore_Con_Test_Case etc[] = {
21 { "Ecore_Con", ecore_con_test_ecore_con },
22 { "Ecore_Con_Url", ecore_con_test_ecore_con_url },
23 { NULL, NULL }
24};
25
26static void
27_list_tests(void)
28{
29 const Ecore_Con_Test_Case *itr;
30
31 itr = etc;
32 fputs("Available Test Cases:\n", stderr);
33 for (; itr->test_case; itr++)
34 fprintf(stderr, "\t%s\n", itr->test_case);
35}
36static Eina_Bool
37_use_test(int argc, const char **argv, const char *test_case)
38{
39 if (argc < 1)
40 return 1;
41
42 for (; argc > 0; argc--, argv++)
43 if (strcmp(test_case, *argv) == 0)
44 return 1;
45 return 0;
46}
47
48static Suite *
49ecore_con_suite_build(int argc, const char **argv)
50{
51 TCase *tc;
52 Suite *s;
53 int i;
54
55 s = suite_create("Ecore_Con");
56
57 for (i = 0; etc[i].test_case; ++i)
58 {
59 if (!_use_test(argc, argv, etc[i].test_case)) continue;
60 tc = tcase_create(etc[i].test_case);
61
62 etc[i].build(tc);
63
64 suite_add_tcase(s, tc);
65 tcase_set_timeout(tc, 0);
66 }
67
68 return s;
69}
70
71int
72main(int argc, char **argv)
73{
74 Suite *s;
75 SRunner *sr;
76 int i, failed_count;
77
78 for (i = 1; i < argc; i++)
79 if ((strcmp(argv[i], "-h") == 0) ||
80 (strcmp(argv[i], "--help") == 0))
81 {
82 fprintf(stderr, "Usage:\n\t%s [test_case1 .. [test_caseN]]\n",
83 argv[0]);
84 _list_tests();
85 return 0;
86 }
87 else if ((strcmp(argv[i], "-l") == 0) ||
88 (strcmp(argv[i], "--list") == 0))
89 {
90 _list_tests();
91 return 0;
92 }
93
94 putenv("EFL_RUN_IN_TREE=1");
95
96 s = ecore_con_suite_build(argc - 1, (const char **)argv + 1);
97 sr = srunner_create(s);
98
99 srunner_set_xml(sr, TESTS_BUILD_DIR "/check-results.xml");
100
101 srunner_run_all(sr, CK_ENV);
102 failed_count = srunner_ntests_failed(sr);
103 srunner_free(sr);
104
105 return (failed_count == 0) ? 0 : 255;
106}
diff --git a/src/tests/ecore_con/ecore_con_suite.h b/src/tests/ecore_con/ecore_con_suite.h
new file mode 100644
index 0000000..9232189
--- /dev/null
+++ b/src/tests/ecore_con/ecore_con_suite.h
@@ -0,0 +1,9 @@
1#ifndef _ECORE_CON_SUITE_H
2#define _ECORE_CON_SUITE_H
3
4#include <check.h>
5
6void ecore_con_test_ecore_con(TCase *tc);
7void ecore_con_test_ecore_con_url(TCase *tc);
8
9#endif /* _ECORE_CON_SUITE_H */
diff --git a/src/tests/ecore/ecore_test_ecore_con.c b/src/tests/ecore_con/ecore_con_test_ecore_con.c
index 686c21c..1d8379e 100644
--- a/src/tests/ecore/ecore_test_ecore_con.c
+++ b/src/tests/ecore_con/ecore_con_test_ecore_con.c
@@ -2,7 +2,7 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#include "ecore_suite.h" 5#include "ecore_con_suite.h"
6 6
7#include <stdio.h> 7#include <stdio.h>
8#include <Ecore.h> 8#include <Ecore.h>
@@ -15,47 +15,47 @@ Eina_Bool
15_add(void *data, int type EINA_UNUSED, void *ev) 15_add(void *data, int type EINA_UNUSED, void *ev)
16{ 16{
17 fail_if (type != ECORE_CON_EVENT_CLIENT_ADD && 17 fail_if (type != ECORE_CON_EVENT_CLIENT_ADD &&
18 type != ECORE_CON_EVENT_SERVER_ADD); 18 type != ECORE_CON_EVENT_SERVER_ADD);
19 19
20 /* Server */ 20 /* Server */
21 if (type == ECORE_CON_EVENT_CLIENT_ADD) 21 if (type == ECORE_CON_EVENT_CLIENT_ADD)
22 { 22 {
23 Ecore_Con_Event_Client_Add *event = ev; 23 Ecore_Con_Event_Client_Add *event = ev;
24 double timeout_val = 10, ret; 24 double timeout_val = 10, ret;
25 void *del_data; 25 void *del_data;
26 26
27 fail_if (data != (void *) 1); 27 fail_if (data != (void *) 1);
28 fail_if (!event->client); 28 fail_if (!event->client);
29 29
30 printf("Client with ip %s, port %d, connected = %d!\n", 30 printf("Client with ip %s, port %d, connected = %d!\n",
31 ecore_con_client_ip_get(event->client), 31 ecore_con_client_ip_get(event->client),
32 ecore_con_client_port_get(event->client), 32 ecore_con_client_port_get(event->client),
33 ecore_con_client_connected_get(event->client)); 33 ecore_con_client_connected_get(event->client));
34 34
35 ecore_con_client_timeout_set(event->client, timeout_val); 35 ecore_con_client_timeout_set(event->client, timeout_val);
36 ret = ecore_con_client_timeout_get(event->client); 36 ret = ecore_con_client_timeout_get(event->client);
37 fail_if (ret != timeout_val); 37 fail_if (ret != timeout_val);
38 38
39 ecore_con_client_data_set(event->client, cdata); 39 ecore_con_client_data_set(event->client, cdata);
40 del_data = ecore_con_client_data_get(event->client); 40 del_data = ecore_con_client_data_get(event->client);
41 fail_if (strcmp((char *)del_data, cdata)); 41 fail_if (strcmp((char *)del_data, cdata));
42 } 42 }
43 else if (type == ECORE_CON_EVENT_SERVER_ADD) 43 else if (type == ECORE_CON_EVENT_SERVER_ADD)
44 { 44 {
45 Ecore_Con_Event_Server_Add *event = ev; 45 Ecore_Con_Event_Server_Add *event = ev;
46 const char ping[] = "PING"; 46 const char ping[] = "PING";
47 int ret; 47 int ret;
48 48
49 fail_if (data != (void *) 2); 49 fail_if (data != (void *) 2);
50 fail_if (!event->server); 50 fail_if (!event->server);
51 printf("Server with ip %s, name %s, port %d, connected = %d!\n", 51 printf("Server with ip %s, name %s, port %d, connected = %d!\n",
52 ecore_con_server_ip_get(event->server), 52 ecore_con_server_ip_get(event->server),
53 ecore_con_server_name_get(event->server), 53 ecore_con_server_name_get(event->server),
54 ecore_con_server_port_get(event->server), 54 ecore_con_server_port_get(event->server),
55 ecore_con_server_connected_get(event->server)); 55 ecore_con_server_connected_get(event->server));
56 ret = ecore_con_server_send(event->server, ping, sizeof(ping)); 56 ret = ecore_con_server_send(event->server, ping, sizeof(ping));
57 fail_if (ret != sizeof(ping)); 57 fail_if (ret != sizeof(ping));
58 ecore_con_server_flush(event->server); 58 ecore_con_server_flush(event->server);
59 } 59 }
60 60
61 return ECORE_CALLBACK_RENEW; 61 return ECORE_CALLBACK_RENEW;
@@ -67,34 +67,35 @@ _del(void *data , int type EINA_UNUSED, void *ev)
67 void *del_data; 67 void *del_data;
68 68
69 fail_if (type != ECORE_CON_EVENT_CLIENT_DEL && 69 fail_if (type != ECORE_CON_EVENT_CLIENT_DEL &&
70 type != ECORE_CON_EVENT_SERVER_DEL); 70 type != ECORE_CON_EVENT_SERVER_DEL);
71 71
72 /* Server */ 72 /* Server */
73 if (type == ECORE_CON_EVENT_CLIENT_DEL) 73 if (type == ECORE_CON_EVENT_CLIENT_DEL)
74 { 74 {
75 Ecore_Con_Event_Client_Del *event = ev; 75 Ecore_Con_Event_Client_Del *event = ev;
76 76
77 fail_if (data != (void *) 1); 77 fail_if (data != (void *) 1);
78 fail_if (!event->client); 78 fail_if (!event->client);
79 79
80 printf("Lost client with ip %s!\n", ecore_con_client_ip_get(event->client)); 80 printf("Lost client with ip %s!\n",
81 printf("Client was connected for %0.3f seconds.\n", 81 ecore_con_client_ip_get(event->client));
82 ecore_con_client_uptime_get(event->client)); 82 printf("Client was connected for %0.3f seconds.\n",
83 ecore_con_client_uptime_get(event->client));
83 84
84 del_data = ecore_con_client_del(event->client); 85 del_data = ecore_con_client_del(event->client);
85 fail_if (strcmp((char *)del_data, cdata)); 86 fail_if (strcmp((char *)del_data, cdata));
86 } 87 }
87 else if (type == ECORE_CON_EVENT_SERVER_DEL) 88 else if (type == ECORE_CON_EVENT_SERVER_DEL)
88 { 89 {
89 Ecore_Con_Event_Server_Del *event = ev; 90 Ecore_Con_Event_Server_Del *event = ev;
90 91
91 fail_if (!event->server); 92 fail_if (!event->server);
92 93
93 fail_if (data != (void *) 2); 94 fail_if (data != (void *) 2);
94 95
95 printf("Lost server with ip %s!\n", ecore_con_server_ip_get(event->server)); 96 printf("Lost server with ip %s!\n", ecore_con_server_ip_get(event->server));
96 97
97 ecore_con_server_del(event->server); 98 ecore_con_server_del(event->server);
98 } 99 }
99 fail (); 100 fail ();
100 101
@@ -106,52 +107,52 @@ _data(void *data, int type EINA_UNUSED, void *ev)
106{ 107{
107 108
108 fail_if (type != ECORE_CON_EVENT_CLIENT_DATA && 109 fail_if (type != ECORE_CON_EVENT_CLIENT_DATA &&
109 type != ECORE_CON_EVENT_SERVER_DATA); 110 type != ECORE_CON_EVENT_SERVER_DATA);
110 111
111 /* Server */ 112 /* Server */
112 if (type == ECORE_CON_EVENT_CLIENT_DATA) 113 if (type == ECORE_CON_EVENT_CLIENT_DATA)
113 { 114 {
114 Ecore_Con_Event_Client_Data *event = ev; 115 Ecore_Con_Event_Client_Data *event = ev;
115 const char pong[] = "PONG"; 116 const char pong[] = "PONG";
116 int ret; 117 int ret;
117 118
118 char fmt[128]; 119 char fmt[128];
119 fail_if (data != (void *) 1); 120 fail_if (data != (void *) 1);
120 121
121 snprintf(fmt, sizeof(fmt), 122 snprintf(fmt, sizeof(fmt),
122 "Received %i bytes from client %s port %d:\n" 123 "Received %i bytes from client %s port %d:\n"
123 ">>>>>\n" 124 ">>>>>\n"
124 "%%.%is\n" 125 "%%.%is\n"
125 ">>>>>\n", 126 ">>>>>\n",
126 event->size, ecore_con_client_ip_get(event->client), 127 event->size, ecore_con_client_ip_get(event->client),
127 ecore_con_client_port_get(event->client), event->size); 128 ecore_con_client_port_get(event->client), event->size);
128 129
129 printf(fmt, event->data); 130 printf(fmt, event->data);
130 fail_if (event->size != sizeof("PING")); 131 fail_if (event->size != sizeof("PING"));
131 fail_if (memcmp (event->data, "PING", sizeof("PING")) != 0); 132 fail_if (memcmp (event->data, "PING", sizeof("PING")) != 0);
132 133
133 ret = ecore_con_client_send(event->client, pong, sizeof(pong)); 134 ret = ecore_con_client_send(event->client, pong, sizeof(pong));
134 fail_if (ret != sizeof(pong)); 135 fail_if (ret != sizeof(pong));
135 ecore_con_client_flush(event->client); 136 ecore_con_client_flush(event->client);
136 } 137 }
137 else if (type == ECORE_CON_EVENT_SERVER_DATA) 138 else if (type == ECORE_CON_EVENT_SERVER_DATA)
138 { 139 {
139 Ecore_Con_Event_Server_Data *event = ev; 140 Ecore_Con_Event_Server_Data *event = ev;
140 char fmt[128]; 141 char fmt[128];
141 142
142 fail_if (data != (void *) 2); 143 fail_if (data != (void *) 2);
143 144
144 snprintf(fmt, sizeof(fmt), 145 snprintf(fmt, sizeof(fmt),
145 "Received %i bytes from server:\n" 146 "Received %i bytes from server:\n"
146 ">>>>>\n" 147 ">>>>>\n"
147 "%%.%is\n" 148 "%%.%is\n"
148 ">>>>>\n", 149 ">>>>>\n",
149 event->size, event->size); 150 event->size, event->size);
150 151
151 printf(fmt, event->data); 152 printf(fmt, event->data);
152 fail_if (event->size != sizeof("PONG")); 153 fail_if (event->size != sizeof("PONG"));
153 fail_if (memcmp (event->data, "PONG", sizeof("PONG")) != 0); 154 fail_if (memcmp (event->data, "PONG", sizeof("PONG")) != 0);
154 ecore_main_loop_quit(); 155 ecore_main_loop_quit();
155 } 156 }
156 157
157 return ECORE_CALLBACK_RENEW; 158 return ECORE_CALLBACK_RENEW;
@@ -195,29 +196,29 @@ void _ecore_con_server_client_tests(Ecore_Con_Type compl_type, const char *name,
195 fail_if(ret != 1); 196 fail_if(ret != 1);
196 197
197 handlers[0] = ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_ADD, 198 handlers[0] = ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_ADD,
198 _add, (void *) 1); 199 _add, (void *) 1);
199 fail_if(handlers[0] == NULL); 200 fail_if(handlers[0] == NULL);
200 handlers[1] = ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_DEL, 201 handlers[1] = ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_DEL,
201 _del, (void *) 1); 202 _del, (void *) 1);
202 fail_if(handlers[1] == NULL); 203 fail_if(handlers[1] == NULL);
203 handlers[2] = ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_DATA, 204 handlers[2] = ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_DATA,
204 _data, (void *) 1); 205 _data, (void *) 1);
205 fail_if(handlers[2] == NULL); 206 fail_if(handlers[2] == NULL);
206 207
207 handlers[3] = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_ADD, 208 handlers[3] = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_ADD,
208 _add, (void *) 2); 209 _add, (void *) 2);
209 fail_if(handlers[3] == NULL); 210 fail_if(handlers[3] == NULL);
210 handlers[4] = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DEL, 211 handlers[4] = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DEL,
211 _del, (void *) 2); 212 _del, (void *) 2);
212 fail_if(handlers[4] == NULL); 213 fail_if(handlers[4] == NULL);
213 handlers[5] = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DATA, 214 handlers[5] = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DATA,
214 _data, (void *) 2); 215 _data, (void *) 2);
215 fail_if(handlers[5] == NULL); 216 fail_if(handlers[5] == NULL);
216 217
217 fail_if (ecore_con_server_connected_get(server)); 218 fail_if (ecore_con_server_connected_get(server));
218 219
219 server = ecore_con_server_add(compl_type, name, server_port, 220 server = ecore_con_server_add(compl_type, name, server_port,
220 server_data); 221 server_data);
221 fail_if (server == NULL); 222 fail_if (server == NULL);
222 223
223 if (is_ssl) 224 if (is_ssl)
@@ -244,7 +245,7 @@ void _ecore_con_server_client_tests(Ecore_Con_Type compl_type, const char *name,
244 ecore_con_server_client_limit_set(server, 1, 0); 245 ecore_con_server_client_limit_set(server, 1, 0);
245 246
246 client = ecore_con_server_connect(compl_type, name, server_port, 247 client = ecore_con_server_connect(compl_type, name, server_port,
247 client_data); 248 client_data);
248 fail_if (client == NULL); 249 fail_if (client == NULL);
249 250
250 if (is_ssl) 251 if (is_ssl)
@@ -263,7 +264,7 @@ void _ecore_con_server_client_tests(Ecore_Con_Type compl_type, const char *name,
263 eina_list_count(clients)); 264 eina_list_count(clients));
264 EINA_LIST_FOREACH(clients, l, cl) 265 EINA_LIST_FOREACH(clients, l, cl)
265 { 266 {
266 printf("%s\n", ecore_con_client_ip_get(cl)); 267 printf("%s\n", ecore_con_client_ip_get(cl));
267 } 268 }
268 269
269 printf("Server was up for %0.3f seconds\n", 270 printf("Server was up for %0.3f seconds\n",
@@ -331,13 +332,13 @@ START_TEST(ecore_test_ecore_con_local_user_none)
331{ 332{
332 const char *xdg_runtime_dir = getenv("XDG_RUNTIME_DIR"); 333 const char *xdg_runtime_dir = getenv("XDG_RUNTIME_DIR");
333 const char *homedir = getenv("HOME"); 334 const char *homedir = getenv("HOME");
334 const char *tmp = getenv("TMP"); 335 const char *tmp = getenv("TMPDIR");
335 336
336 unsetenv("XDG_RUNTIME_DIR"); 337 unsetenv("XDG_RUNTIME_DIR");
337 unsetenv("HOME"); 338 unsetenv("HOME");
338 unsetenv("TMP"); 339 unsetenv("TMPDIR");
339 _ecore_con_server_client_tests(ECORE_CON_LOCAL_USER, "test_sock", EINA_FALSE, 12345); 340 _ecore_con_server_client_tests(ECORE_CON_LOCAL_USER, "test_sock", EINA_FALSE, 12345);
340 setenv("TMP", tmp, 1); 341 setenv("TMPDIR", tmp, 1);
341 setenv("HOME", homedir, 1); 342 setenv("HOME", homedir, 1);
342 setenv("XDG_RUNTIME_DIR", xdg_runtime_dir, 1); 343 setenv("XDG_RUNTIME_DIR", xdg_runtime_dir, 1);
343} 344}
@@ -531,7 +532,7 @@ START_TEST(ecore_test_ecore_con_shutdown_bef_init)
531} 532}
532END_TEST 533END_TEST
533 534
534void ecore_test_ecore_con(TCase *tc) 535void ecore_con_test_ecore_con(TCase *tc)
535{ 536{
536 tcase_add_test(tc, ecore_test_ecore_con_init); 537 tcase_add_test(tc, ecore_test_ecore_con_init);
537 tcase_add_test(tc, ecore_test_ecore_con_local_user); 538 tcase_add_test(tc, ecore_test_ecore_con_local_user);
diff --git a/src/tests/ecore/ecore_test_ecore_con_url.c b/src/tests/ecore_con/ecore_con_test_ecore_con_url.c
index 99554c2..0ddcfe5 100644
--- a/src/tests/ecore/ecore_test_ecore_con_url.c
+++ b/src/tests/ecore_con/ecore_con_test_ecore_con_url.c
@@ -2,7 +2,7 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#include "ecore_suite.h" 5#include "ecore_con_suite.h"
6 6
7#include <stdio.h> 7#include <stdio.h>
8#include <Ecore.h> 8#include <Ecore.h>
@@ -318,7 +318,7 @@ START_TEST(ecore_test_ecore_con_url_init)
318} 318}
319END_TEST 319END_TEST
320 320
321void ecore_test_ecore_con_url(TCase *tc) 321void ecore_con_test_ecore_con_url(TCase *tc)
322{ 322{
323 tcase_add_test(tc, ecore_test_ecore_con_url_init); 323 tcase_add_test(tc, ecore_test_ecore_con_url_init);
324 tcase_add_test(tc, ecore_test_ecore_con_url_create); 324 tcase_add_test(tc, ecore_test_ecore_con_url_create);
diff --git a/src/tests/ecore/server.key b/src/tests/ecore_con/server.key
index 922b0f7..922b0f7 100644
--- a/src/tests/ecore/server.key
+++ b/src/tests/ecore_con/server.key
diff --git a/src/tests/ecore/server.pem b/src/tests/ecore_con/server.pem
index 84e8de3..84e8de3 100644
--- a/src/tests/ecore/server.pem
+++ b/src/tests/ecore_con/server.pem