summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-07-04 13:25:14 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-07-04 13:25:14 +0000
commit15de701534fc172c6622397b6692974f784db3e5 (patch)
treed27acc8c03cfd09fc2fa75e7b029639199369265
parent2d8e7bcaf1656f2ebc75c447c5e2a7fee8664db2 (diff)
- clean up testss
-rw-r--r--src/transport/test_quota_compliance.c21
-rw-r--r--src/transport/test_transport_api.c13
-rw-r--r--src/transport/test_transport_api_bidirectional_connect.c7
-rw-r--r--src/transport/test_transport_api_blacklisting.c24
-rw-r--r--src/transport/test_transport_api_disconnect.c22
-rw-r--r--src/transport/test_transport_api_limited_sockets.c13
-rw-r--r--src/transport/test_transport_api_reliability.c25
-rw-r--r--src/transport/test_transport_api_restart_1peer.c13
-rw-r--r--src/transport/test_transport_api_restart_2peers.c12
-rw-r--r--src/transport/test_transport_api_timeout.c14
-rw-r--r--src/transport/test_transport_api_unreliability.c21
-rw-r--r--src/transport/test_transport_api_unreliability_constant.c24
-rw-r--r--src/transport/test_transport_startonly.c21
-rw-r--r--src/transport/test_transport_testing.c3
-rw-r--r--src/transport/test_transport_testing_restart.c1
-rw-r--r--src/transport/test_transport_testing_startstop.c1
16 files changed, 1 insertions, 234 deletions
diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c
index 8f4db5352..ebfbcd5eb 100644
--- a/src/transport/test_quota_compliance.c
+++ b/src/transport/test_quota_compliance.c
@@ -24,24 +24,10 @@
* This test case tests quota compliance both on transport level
*/
#include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_hello_lib.h"
-#include "gnunet_getopt_lib.h"
-#include "gnunet_os_lib.h"
-#include "gnunet_program_lib.h"
-#include "gnunet_scheduler_lib.h"
-#include "gnunet_server_lib.h"
#include "gnunet_transport_service.h"
#include "gauger.h"
-#include "transport.h"
#include "transport-testing.h"
-#define VERBOSE GNUNET_NO
-
-#define VERBOSE_ARM GNUNET_NO
-
-#define START_ARM GNUNET_YES
-
/**
* Testcase timeout
*/
@@ -564,9 +550,6 @@ check ()
static char *argv[] = { "test_transport-quota-compliance",
"-c",
"test_quota_compliance_data.conf",
-#if VERBOSE
- "-L", "DEBUG",
-#endif
NULL
};
static struct GNUNET_GETOPT_CommandLineOption options[] = {
@@ -586,11 +569,7 @@ main (int argc, char *argv[])
GNUNET_TRANSPORT_TESTING_get_test_name (argv[0], &test_name);
GNUNET_log_setup (test_name,
-#if VERBOSE
- "DEBUG",
-#else
"WARNING",
-#endif
NULL);
GNUNET_TRANSPORT_TESTING_get_test_source_name (__FILE__, &test_source);
diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c
index f944fac61..1316efe25 100644
--- a/src/transport/test_transport_api.c
+++ b/src/transport/test_transport_api.c
@@ -27,19 +27,9 @@
* C code apparently.
*/
#include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_hello_lib.h"
-#include "gnunet_getopt_lib.h"
-#include "gnunet_os_lib.h"
-#include "gnunet_program_lib.h"
-#include "gnunet_scheduler_lib.h"
#include "gnunet_transport_service.h"
-#include "transport.h"
#include "transport-testing.h"
-
-#define START_ARM GNUNET_YES
-
/**
* How long until we give up on transmitting the message?
*/
@@ -383,9 +373,6 @@ check ()
GNUNET_GETOPT_OPTION_END
};
-#if WRITECONFIG
- setTransportOptions ("test_transport_api_data.conf");
-#endif
send_task = GNUNET_SCHEDULER_NO_TASK;
ok = 1;
diff --git a/src/transport/test_transport_api_bidirectional_connect.c b/src/transport/test_transport_api_bidirectional_connect.c
index 2c4eeab3c..39232160f 100644
--- a/src/transport/test_transport_api_bidirectional_connect.c
+++ b/src/transport/test_transport_api_bidirectional_connect.c
@@ -25,14 +25,7 @@
* (almost) the same time
*/
#include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_hello_lib.h"
-#include "gnunet_getopt_lib.h"
-#include "gnunet_os_lib.h"
-#include "gnunet_program_lib.h"
-#include "gnunet_scheduler_lib.h"
#include "gnunet_transport_service.h"
-#include "transport.h"
#include "transport-testing.h"
diff --git a/src/transport/test_transport_api_blacklisting.c b/src/transport/test_transport_api_blacklisting.c
index 909ea57d4..55adb5b10 100644
--- a/src/transport/test_transport_api_blacklisting.c
+++ b/src/transport/test_transport_api_blacklisting.c
@@ -25,22 +25,9 @@
*
*/
#include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_hello_lib.h"
-#include "gnunet_getopt_lib.h"
-#include "gnunet_os_lib.h"
-#include "gnunet_program_lib.h"
-#include "gnunet_scheduler_lib.h"
#include "gnunet_transport_service.h"
-#include "transport.h"
#include "transport-testing.h"
-#define VERBOSE GNUNET_NO
-#define VERBOSE_ARM GNUNET_NO
-
-#define START_ARM GNUNET_YES
-
-
struct PeerContext *p1;
struct PeerContext *p2;
@@ -435,19 +422,12 @@ check ()
static char *const argv[] = { "test-transport-api-blacklisting",
"-c",
"test_transport_api_data.conf",
-#if VERBOSE
- "-L", "DEBUG",
-#endif
NULL
};
static struct GNUNET_GETOPT_CommandLineOption options[] = {
GNUNET_GETOPT_OPTION_END
};
-#if WRITECONFIG
- setTransportOptions ("test_transport_api_data.conf");
-#endif
-
ok = 1;
GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, "test-transport-api-blacklisting",
"nohelp", options, &run, &ok);
@@ -461,11 +441,7 @@ main (int argc, char *argv[])
int ret;
GNUNET_log_setup ("test-transport-api-blacklisting",
-#if VERBOSE
- "DEBUG",
-#else
"WARNING",
-#endif
NULL);
tth = GNUNET_TRANSPORT_TESTING_init ();
diff --git a/src/transport/test_transport_api_disconnect.c b/src/transport/test_transport_api_disconnect.c
index 973c4cfbc..7a26c7eae 100644
--- a/src/transport/test_transport_api_disconnect.c
+++ b/src/transport/test_transport_api_disconnect.c
@@ -24,21 +24,9 @@
* This test case tests disconnect notifications in peer shutdown
*/
#include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_hello_lib.h"
-#include "gnunet_getopt_lib.h"
-#include "gnunet_os_lib.h"
-#include "gnunet_program_lib.h"
-#include "gnunet_scheduler_lib.h"
#include "gnunet_transport_service.h"
-#include "transport.h"
#include "transport-testing.h"
-#define VERBOSE GNUNET_NO
-#define VERBOSE_ARM GNUNET_NO
-
-#define START_ARM GNUNET_YES
-
/**
* How long until we give up on transmitting the message?
*/
@@ -374,18 +362,12 @@ check ()
static char *const argv[] = { "test-transport-api",
"-c",
"test_transport_api_data.conf",
-#if VERBOSE
- "-L", "DEBUG",
-#endif
NULL
};
static struct GNUNET_GETOPT_CommandLineOption options[] = {
GNUNET_GETOPT_OPTION_END
};
-#if WRITECONFIG
- setTransportOptions ("test_transport_api_data.conf");
-#endif
send_task = GNUNET_SCHEDULER_NO_TASK;
ok = 1;
@@ -403,11 +385,7 @@ main (int argc, char *argv[])
GNUNET_TRANSPORT_TESTING_get_test_name (argv[0], &test_name);
GNUNET_log_setup (test_name,
-#if VERBOSE
- "DEBUG",
-#else
"WARNING",
-#endif
NULL);
GNUNET_TRANSPORT_TESTING_get_test_source_name (__FILE__, &test_source);
diff --git a/src/transport/test_transport_api_limited_sockets.c b/src/transport/test_transport_api_limited_sockets.c
index cd143aebe..c605a3182 100644
--- a/src/transport/test_transport_api_limited_sockets.c
+++ b/src/transport/test_transport_api_limited_sockets.c
@@ -27,22 +27,9 @@
* C code apparently.
*/
#include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_hello_lib.h"
-#include "gnunet_getopt_lib.h"
-#include "gnunet_os_lib.h"
-#include "gnunet_program_lib.h"
-#include "gnunet_scheduler_lib.h"
#include "gnunet_transport_service.h"
-#include "transport.h"
#include "transport-testing.h"
-#define VERBOSE GNUNET_NO
-
-#define VERBOSE_ARM GNUNET_NO
-
-#define START_ARM GNUNET_YES
-
/**
* How long until we give up on transmitting the message?
*/
diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c
index 759241c52..bef2d0ffe 100644
--- a/src/transport/test_transport_api_reliability.c
+++ b/src/transport/test_transport_api_reliability.c
@@ -26,24 +26,9 @@
* achieve reliable message delivery.
*/
#include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_hello_lib.h"
-#include "gnunet_getopt_lib.h"
-#include "gnunet_os_lib.h"
-#include "gnunet_program_lib.h"
-#include "gnunet_scheduler_lib.h"
-#include "gnunet_server_lib.h"
#include "gnunet_transport_service.h"
#include "gauger.h"
-#include "transport.h"
#include "transport-testing.h"
-
-#define VERBOSE GNUNET_NO
-
-#define VERBOSE_ARM GNUNET_NO
-
-#define START_ARM GNUNET_YES
-
/**
* Testcase timeout
*/
@@ -479,18 +464,12 @@ check ()
static char *argv[] = { "test_transport",
"-c",
"test_transport_api_data.conf",
-#if VERBOSE
- "-L", "DEBUG",
-#endif
NULL
};
static struct GNUNET_GETOPT_CommandLineOption options[] = {
GNUNET_GETOPT_OPTION_END
};
-#if WRITECONFIG
- setTransportOptions ("test_transport_api_data.conf");
-#endif
ok = 1;
GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, test_name,
"nohelp", options, &run, &ok);
@@ -506,11 +485,7 @@ main (int argc, char *argv[])
GNUNET_TRANSPORT_TESTING_get_test_name (argv[0], &test_name);
GNUNET_log_setup (test_name,
-#if VERBOSE
- "DEBUG",
-#else
"WARNING",
-#endif
NULL);
GNUNET_TRANSPORT_TESTING_get_test_source_name (__FILE__, &test_source);
diff --git a/src/transport/test_transport_api_restart_1peer.c b/src/transport/test_transport_api_restart_1peer.c
index b7fc7ab30..5f8f97b75 100644
--- a/src/transport/test_transport_api_restart_1peer.c
+++ b/src/transport/test_transport_api_restart_1peer.c
@@ -26,19 +26,9 @@
* C code apparently.
*/
#include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_hello_lib.h"
-#include "gnunet_getopt_lib.h"
-#include "gnunet_os_lib.h"
-#include "gnunet_program_lib.h"
-#include "gnunet_scheduler_lib.h"
#include "gnunet_transport_service.h"
-#include "transport.h"
#include "transport-testing.h"
-
-#define START_ARM GNUNET_YES
-
/**
* How long until we give up on transmitting the message?
*/
@@ -437,9 +427,6 @@ check ()
GNUNET_GETOPT_OPTION_END
};
-#if WRITECONFIG
- setTransportOptions ("test_transport_api_data.conf");
-#endif
send_task = GNUNET_SCHEDULER_NO_TASK;
ok = 1;
diff --git a/src/transport/test_transport_api_restart_2peers.c b/src/transport/test_transport_api_restart_2peers.c
index 1d7790c9f..bdf14744f 100644
--- a/src/transport/test_transport_api_restart_2peers.c
+++ b/src/transport/test_transport_api_restart_2peers.c
@@ -26,18 +26,9 @@
* C code apparently.
*/
#include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_hello_lib.h"
-#include "gnunet_getopt_lib.h"
-#include "gnunet_os_lib.h"
-#include "gnunet_program_lib.h"
-#include "gnunet_scheduler_lib.h"
#include "gnunet_transport_service.h"
-#include "transport.h"
#include "transport-testing.h"
-#define START_ARM GNUNET_YES
-
/**
* How long until we give up on transmitting the message?
*/
@@ -417,9 +408,6 @@ check ()
GNUNET_GETOPT_OPTION_END
};
-#if WRITECONFIG
- setTransportOptions ("test_transport_api_data.conf");
-#endif
send_task = GNUNET_SCHEDULER_NO_TASK;
ok = 1;
diff --git a/src/transport/test_transport_api_timeout.c b/src/transport/test_transport_api_timeout.c
index 8b92dce1e..264573937 100644
--- a/src/transport/test_transport_api_timeout.c
+++ b/src/transport/test_transport_api_timeout.c
@@ -28,20 +28,9 @@
*/
#include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_hello_lib.h"
-#include "gnunet_getopt_lib.h"
-#include "gnunet_os_lib.h"
-#include "gnunet_program_lib.h"
-#include "gnunet_scheduler_lib.h"
#include "gnunet_transport_service.h"
-#include "transport.h"
#include "transport-testing.h"
-#define VERBOSE GNUNET_NO
-
-#define START_ARM GNUNET_YES
-
/**
* How long until we give up on transmitting the message?
*/
@@ -305,9 +294,6 @@ check ()
GNUNET_GETOPT_OPTION_END
};
-#if WRITECONFIG
- setTransportOptions ("test_transport_api_data.conf");
-#endif
timer_task = GNUNET_SCHEDULER_NO_TASK;
ok = 1;
diff --git a/src/transport/test_transport_api_unreliability.c b/src/transport/test_transport_api_unreliability.c
index 53de91ab1..56e609e92 100644
--- a/src/transport/test_transport_api_unreliability.c
+++ b/src/transport/test_transport_api_unreliability.c
@@ -27,24 +27,10 @@
* achieve reliable message delivery.
*/
#include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_hello_lib.h"
-#include "gnunet_getopt_lib.h"
-#include "gnunet_os_lib.h"
-#include "gnunet_program_lib.h"
-#include "gnunet_scheduler_lib.h"
-#include "gnunet_server_lib.h"
#include "gnunet_transport_service.h"
#include "gauger.h"
-#include "transport.h"
#include "transport-testing.h"
-#define VERBOSE GNUNET_NO
-
-#define VERBOSE_ARM GNUNET_NO
-
-#define START_ARM GNUNET_YES
-
/**
* Testcase timeout
*/
@@ -525,9 +511,6 @@ check ()
static char *const argv[] = { "test-transport-api-unreliability",
"-c",
"test_transport_api_data.conf",
-#if VERBOSE
- "-L", "DEBUG",
-#endif
NULL
};
static struct GNUNET_GETOPT_CommandLineOption options[] = {
@@ -553,11 +536,7 @@ main (int argc, char *argv[])
GNUNET_TRANSPORT_TESTING_get_test_name (argv[0], &test_name);
GNUNET_log_setup (test_name,
-#if VERBOSE
- "DEBUG",
-#else
"WARNING",
-#endif
NULL);
GNUNET_TRANSPORT_TESTING_get_test_source_name (__FILE__, &test_source);
diff --git a/src/transport/test_transport_api_unreliability_constant.c b/src/transport/test_transport_api_unreliability_constant.c
index fb72b0f1c..cb24675c1 100644
--- a/src/transport/test_transport_api_unreliability_constant.c
+++ b/src/transport/test_transport_api_unreliability_constant.c
@@ -27,24 +27,10 @@
* achieve reliable message delivery.
*/
#include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_hello_lib.h"
-#include "gnunet_getopt_lib.h"
-#include "gnunet_os_lib.h"
-#include "gnunet_program_lib.h"
-#include "gnunet_scheduler_lib.h"
-#include "gnunet_server_lib.h"
#include "gnunet_transport_service.h"
#include "gauger.h"
-#include "transport.h"
#include "transport-testing.h"
-#define VERBOSE GNUNET_NO
-
-#define VERBOSE_ARM GNUNET_NO
-
-#define START_ARM GNUNET_YES
-
/**
* Testcase timeout
*/
@@ -464,18 +450,12 @@ check ()
static char *const argv[] = { "test-transport-api-unreliability-constant",
"-c",
"test_transport_api_data.conf",
-#if VERBOSE
- "-L", "DEBUG",
-#endif
NULL
};
static struct GNUNET_GETOPT_CommandLineOption options[] = {
GNUNET_GETOPT_OPTION_END
};
-#if WRITECONFIG
- setTransportOptions ("test_transport_api_data.conf");
-#endif
ok = GNUNET_SYSERR;
GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, test_name,
@@ -492,11 +472,7 @@ main (int argc, char *argv[])
GNUNET_TRANSPORT_TESTING_get_test_name (argv[0], &test_name);
GNUNET_log_setup (test_name,
-#if VERBOSE
- "DEBUG",
-#else
"WARNING",
-#endif
NULL);
GNUNET_TRANSPORT_TESTING_get_test_source_name (__FILE__, &test_source);
diff --git a/src/transport/test_transport_startonly.c b/src/transport/test_transport_startonly.c
index 79578ab53..0f3e88b1f 100644
--- a/src/transport/test_transport_startonly.c
+++ b/src/transport/test_transport_startonly.c
@@ -27,22 +27,9 @@
* C code apparently.
*/
#include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_hello_lib.h"
-#include "gnunet_getopt_lib.h"
-#include "gnunet_os_lib.h"
-#include "gnunet_program_lib.h"
-#include "gnunet_scheduler_lib.h"
#include "gnunet_transport_service.h"
-#include "transport.h"
#include "transport-testing.h"
-#define VERBOSE GNUNET_NO
-
-#define VERBOSE_ARM GNUNET_NO
-
-#define START_ARM GNUNET_YES
-
/**
* How long until we give up on transmitting the message?
*/
@@ -160,19 +147,13 @@ int
main (int argc, char *argv[])
{
GNUNET_log_setup ("test_transport_testing",
-#if VERBOSE
- "DEBUG",
-#else
"WARNING",
-#endif
+
NULL);
char *const argv_1[] = { "test_transport_testing",
"-c",
"test_transport_api_data.conf",
-#if VERBOSE
- "-L", "DEBUG",
-#endif
NULL
};
diff --git a/src/transport/test_transport_testing.c b/src/transport/test_transport_testing.c
index 7b04d9370..7875f1cfa 100644
--- a/src/transport/test_transport_testing.c
+++ b/src/transport/test_transport_testing.c
@@ -27,9 +27,6 @@
* C code apparently.
*/
#include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_hello_lib.h"
-#include "gnunet_scheduler_lib.h"
#include "gnunet_transport_service.h"
#include "transport-testing.h"
/**
diff --git a/src/transport/test_transport_testing_restart.c b/src/transport/test_transport_testing_restart.c
index ed7b2f5c1..8ca18f982 100644
--- a/src/transport/test_transport_testing_restart.c
+++ b/src/transport/test_transport_testing_restart.c
@@ -24,7 +24,6 @@
*
*/
#include "platform.h"
-#include "gnunet_common.h"
#include "gnunet_transport_service.h"
#include "transport-testing.h"
diff --git a/src/transport/test_transport_testing_startstop.c b/src/transport/test_transport_testing_startstop.c
index e1c370627..22a4e5148 100644
--- a/src/transport/test_transport_testing_startstop.c
+++ b/src/transport/test_transport_testing_startstop.c
@@ -24,7 +24,6 @@
*
*/
#include "platform.h"
-#include "gnunet_common.h"
#include "gnunet_transport_service.h"
#include "transport-testing.h"