summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/CMakeLists.txt15
-rw-r--r--testing/DHT_test.c4
-rw-r--r--testing/Lossless_UDP_testclient.c4
-rw-r--r--testing/Lossless_UDP_testserver.c4
-rw-r--r--testing/Makefile.inc89
-rw-r--r--testing/Messenger_test.c2
-rw-r--r--testing/cmake/DHT_test.cmake10
-rw-r--r--testing/cmake/Lossless_UDP_testclient.cmake9
-rw-r--r--testing/cmake/Lossless_UDP_testserver.cmake9
-rw-r--r--testing/cmake/Messenger_test.cmake9
-rw-r--r--testing/cmake/crypto_speed_test.cmake9
-rw-r--r--testing/cmake/nTox.cmake12
-rw-r--r--testing/crypto_speed_test.c2
-rw-r--r--testing/nTox.h2
14 files changed, 98 insertions, 82 deletions
diff --git a/testing/CMakeLists.txt b/testing/CMakeLists.txt
deleted file mode 100644
index 9bab6efb..00000000
--- a/testing/CMakeLists.txt
+++ /dev/null
@@ -1,15 +0,0 @@
1cmake_minimum_required(VERSION 2.6.0)
2
3cmake_policy(SET CMP0011 NEW)
4
5include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/DHT_test.cmake)
6include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Lossless_UDP_testclient.cmake)
7include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Lossless_UDP_testserver.cmake)
8include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Messenger_test.cmake)
9include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/crypto_speed_test.cmake)
10
11if(WIN32)
12 #Do nothing
13else()
14 include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/nTox.cmake)
15endif()
diff --git a/testing/DHT_test.c b/testing/DHT_test.c
index 53369794..d14f9781 100644
--- a/testing/DHT_test.c
+++ b/testing/DHT_test.c
@@ -28,8 +28,8 @@
28 */ 28 */
29 29
30//#include "../core/network.h" 30//#include "../core/network.h"
31#include "../core/DHT.h" 31#include "../toxcore/DHT.h"
32#include "../core/friend_requests.h" 32#include "../toxcore/friend_requests.h"
33#include "misc_tools.h" 33#include "misc_tools.h"
34 34
35#include <string.h> 35#include <string.h>
diff --git a/testing/Lossless_UDP_testclient.c b/testing/Lossless_UDP_testclient.c
index 09e9e0a3..af349863 100644
--- a/testing/Lossless_UDP_testclient.c
+++ b/testing/Lossless_UDP_testclient.c
@@ -28,8 +28,8 @@
28 * 28 *
29 */ 29 */
30 30
31#include "../core/network.h" 31#include "../toxcore/network.h"
32#include "../core/Lossless_UDP.h" 32#include "../toxcore/Lossless_UDP.h"
33 33
34#ifdef WIN32 34#ifdef WIN32
35 35
diff --git a/testing/Lossless_UDP_testserver.c b/testing/Lossless_UDP_testserver.c
index a82b787a..5c2cabd0 100644
--- a/testing/Lossless_UDP_testserver.c
+++ b/testing/Lossless_UDP_testserver.c
@@ -28,8 +28,8 @@
28 * 28 *
29 */ 29 */
30 30
31#include "../core/network.h" 31#include "../toxcore/network.h"
32#include "../core/Lossless_UDP.h" 32#include "../toxcore/Lossless_UDP.h"
33 33
34//Sleep function (x = milliseconds) 34//Sleep function (x = milliseconds)
35#ifdef WIN32 35#ifdef WIN32
diff --git a/testing/Makefile.inc b/testing/Makefile.inc
new file mode 100644
index 00000000..067b6ead
--- /dev/null
+++ b/testing/Makefile.inc
@@ -0,0 +1,89 @@
1if BUILD_NTOX
2
3bin_PROGRAMS += nTox
4
5nTox_SOURCES = $(top_srcdir)/testing/misc_tools.h \
6 $(top_srcdir)/testing/misc_tools.c \
7 $(top_srcdir)/testing/nTox.h \
8 $(top_srcdir)/testing/nTox.c
9
10nTox_CFLAGS = $(LIBSODIUM_CFLAGS) \
11 $(NCURSES_CFLAGS)
12
13nTox_LDADD = $(LIBSODIUM_LDFLAGS) \
14 libtoxcore.la \
15 $(LIBSODIUM_LIBS) \
16 $(NCURSES_LIBS)
17
18endif
19
20
21noinst_PROGRAMS += DHT_test \
22 Lossless_UDP_testclient \
23 Lossless_UDP_testserver \
24 Messenger_test \
25 crypto_speed_test
26
27DHT_test_SOURCES = $(top_srcdir)/testing/DHT_test.c \
28 $(top_srcdir)/testing/misc_tools.h \
29 $(top_srcdir)/testing/misc_tools.c
30
31DHT_test_CFLAGS = $(LIBSODIUM_CFLAGS)
32
33DHT_test_LDADD = $(LIBSODIUM_LDFLAGS) \
34 libtoxcore.la \
35 $(LIBSODIUM_LIBS) \
36 $(WINSOCK2_LIBS)
37
38
39Lossless_UDP_testclient_SOURCES = \
40 $(top_srcdir)/testing/Lossless_UDP_testclient.c
41
42Lossless_UDP_testclient_CFLAGS = \
43 $(LIBSODIUM_CFLAGS)
44
45Lossless_UDP_testclient_LDADD = \
46 $(LIBSODIUM_LDFLAGS) \
47 libtoxcore.la \
48 $(LIBSODIUM_LIBS) \
49 $(WINSOCK2_LIBS)
50
51
52Lossless_UDP_testserver_SOURCES = \
53 $(top_srcdir)/testing/Lossless_UDP_testserver.c
54
55Lossless_UDP_testserver_CFLAGS = \
56 $(LIBSODIUM_CFLAGS)
57
58Lossless_UDP_testserver_LDADD = \
59 $(LIBSODIUM_LDFLAGS) \
60 libtoxcore.la \
61 $(LIBSODIUM_LIBS) \
62 $(WINSOCK2_LIBS)
63
64
65Messenger_test_SOURCES = \
66 $(top_srcdir)/testing/Messenger_test.c \
67 $(top_srcdir)/testing/misc_tools.h \
68 $(top_srcdir)/testing/misc_tools.c
69
70Messenger_test_CFLAGS = $(LIBSODIUM_CFLAGS)
71
72Messenger_test_LDADD = $(LIBSODIUM_LDFLAGS) \
73 libtoxcore.la \
74 $(LIBSODIUM_LIBS) \
75 $(WINSOCK2_LIBS)
76
77
78crypto_speed_test_SOURCES = \
79 $(top_srcdir)/testing/crypto_speed_test.c
80
81crypto_speed_test_CFLAGS = \
82 $(LIBSODIUM_CFLAGS)
83
84crypto_speed_test_LDADD = \
85 $(LIBSODIUM_LDFLAGS) \
86 libtoxcore.la \
87 $(LIBSODIUM_LIBS) \
88 $(WINSOCK2_LIBS)
89
diff --git a/testing/Messenger_test.c b/testing/Messenger_test.c
index c76584d7..19fd9ab7 100644
--- a/testing/Messenger_test.c
+++ b/testing/Messenger_test.c
@@ -37,7 +37,7 @@
37 * 37 *
38 */ 38 */
39 39
40#include "../core/Messenger.h" 40#include "../toxcore/Messenger.h"
41#include "misc_tools.h" 41#include "misc_tools.h"
42 42
43#ifdef WIN32 43#ifdef WIN32
diff --git a/testing/cmake/DHT_test.cmake b/testing/cmake/DHT_test.cmake
deleted file mode 100644
index bb5bf05f..00000000
--- a/testing/cmake/DHT_test.cmake
+++ /dev/null
@@ -1,10 +0,0 @@
1cmake_minimum_required(VERSION 2.6.0)
2project(DHT_test C)
3
4set(exe_name DHT_test)
5
6add_executable(${exe_name}
7 DHT_test.c
8 misc_tools.c)
9
10linkCoreLibraries(${exe_name})
diff --git a/testing/cmake/Lossless_UDP_testclient.cmake b/testing/cmake/Lossless_UDP_testclient.cmake
deleted file mode 100644
index 5f651807..00000000
--- a/testing/cmake/Lossless_UDP_testclient.cmake
+++ /dev/null
@@ -1,9 +0,0 @@
1cmake_minimum_required(VERSION 2.6.0)
2project(Lossless_UDP_testclient C)
3
4set(exe_name Lossless_UDP_testclient)
5
6add_executable(${exe_name}
7 Lossless_UDP_testclient.c)
8
9linkCoreLibraries(${exe_name})
diff --git a/testing/cmake/Lossless_UDP_testserver.cmake b/testing/cmake/Lossless_UDP_testserver.cmake
deleted file mode 100644
index 26f9302e..00000000
--- a/testing/cmake/Lossless_UDP_testserver.cmake
+++ /dev/null
@@ -1,9 +0,0 @@
1cmake_minimum_required(VERSION 2.6.0)
2project(Lossless_UDP_testserver C)
3
4set(exe_name Lossless_UDP_testserver)
5
6add_executable(${exe_name}
7 Lossless_UDP_testserver.c)
8
9linkCoreLibraries(${exe_name})
diff --git a/testing/cmake/Messenger_test.cmake b/testing/cmake/Messenger_test.cmake
deleted file mode 100644
index 15fcd77b..00000000
--- a/testing/cmake/Messenger_test.cmake
+++ /dev/null
@@ -1,9 +0,0 @@
1cmake_minimum_required(VERSION 2.6.0)
2project(Messenger_test C)
3
4set(exe_name Messenger_test)
5
6add_executable(${exe_name}
7 Messenger_test.c misc_tools.c)
8
9linkCoreLibraries(${exe_name})
diff --git a/testing/cmake/crypto_speed_test.cmake b/testing/cmake/crypto_speed_test.cmake
deleted file mode 100644
index c269af5b..00000000
--- a/testing/cmake/crypto_speed_test.cmake
+++ /dev/null
@@ -1,9 +0,0 @@
1cmake_minimum_required(VERSION 2.6.0)
2project(crypto_speed_test C)
3
4set(exe_name crypto_speed_test)
5
6add_executable(${exe_name}
7 crypto_speed_test.c)
8
9linkCoreLibraries(${exe_name})
diff --git a/testing/cmake/nTox.cmake b/testing/cmake/nTox.cmake
deleted file mode 100644
index 44476b8f..00000000
--- a/testing/cmake/nTox.cmake
+++ /dev/null
@@ -1,12 +0,0 @@
1cmake_minimum_required(VERSION 2.6.0)
2project(nTox C)
3
4set(exe_name nTox)
5
6add_executable(${exe_name}
7 nTox.c misc_tools.c)
8
9target_link_libraries(${exe_name}
10 ncurses)
11
12linkCoreLibraries(${exe_name})
diff --git a/testing/crypto_speed_test.c b/testing/crypto_speed_test.c
index a61b30e8..b06c25e1 100644
--- a/testing/crypto_speed_test.c
+++ b/testing/crypto_speed_test.c
@@ -28,7 +28,7 @@ double get_time()
28 28
29#endif 29#endif
30 30
31#include "../core/net_crypto.h" 31#include "../toxcore/net_crypto.h"
32#include <stdlib.h> 32#include <stdlib.h>
33#include <time.h> 33#include <time.h>
34 34
diff --git a/testing/nTox.h b/testing/nTox.h
index b27a956f..df9d404a 100644
--- a/testing/nTox.h
+++ b/testing/nTox.h
@@ -35,7 +35,7 @@
35#include <arpa/inet.h> 35#include <arpa/inet.h>
36#include <sys/types.h> 36#include <sys/types.h>
37#include <netdb.h> 37#include <netdb.h>
38#include "../core/tox.h" 38#include "../toxcore/tox.h"
39 39
40#define STRING_LENGTH 256 40#define STRING_LENGTH 256
41#define HISTORY 50 41#define HISTORY 50