aboutsummaryrefslogtreecommitdiff
path: root/src/mesh/test_mesh_2dtorus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesh/test_mesh_2dtorus.c')
-rw-r--r--src/mesh/test_mesh_2dtorus.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/src/mesh/test_mesh_2dtorus.c b/src/mesh/test_mesh_2dtorus.c
index 58777c001..4c1e406ef 100644
--- a/src/mesh/test_mesh_2dtorus.c
+++ b/src/mesh/test_mesh_2dtorus.c
@@ -25,7 +25,6 @@
25#include "platform.h" 25#include "platform.h"
26#include "gnunet_testing_lib.h" 26#include "gnunet_testing_lib.h"
27 27
28#define VERBOSE GNUNET_YES
29#define REMOVE_DIR GNUNET_YES 28#define REMOVE_DIR GNUNET_YES
30 29
31/** 30/**
@@ -107,13 +106,11 @@ shutdown_callback (void *cls, const char *emsg)
107 "test: Shutdown of peers failed! (%s)\n", emsg); 106 "test: Shutdown of peers failed! (%s)\n", emsg);
108 ok--; 107 ok--;
109 } 108 }
110#if VERBOSE
111 else 109 else
112 { 110 {
113 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 111 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
114 "test: All peers successfully shut down!\n"); 112 "test: All peers successfully shut down!\n");
115 } 113 }
116#endif
117 GNUNET_CONFIGURATION_destroy (testing_cfg); 114 GNUNET_CONFIGURATION_destroy (testing_cfg);
118} 115}
119 116
@@ -121,10 +118,7 @@ shutdown_callback (void *cls, const char *emsg)
121static void 118static void
122shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 119shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
123{ 120{
124#if VERBOSE
125 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Ending test.\n"); 121 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Ending test.\n");
126#endif
127
128 GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); 122 GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
129} 123}
130 124
@@ -201,15 +195,9 @@ peergroup_ready (void *cls, const char *emsg)
201 GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); 195 GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
202 return; 196 return;
203 } 197 }
204#if VERBOSE
205 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 198 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
206 "************************************************************\n"); 199 "test: Peer Group started successfully with %u connections\n",
207 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
208 "test: Peer Group started successfully!\n");
209 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Have %u connections\n",
210 total_connections); 200 total_connections);
211#endif
212
213 peers_running = GNUNET_TESTING_daemons_running (pg); 201 peers_running = GNUNET_TESTING_daemons_running (pg);
214 if (0 < failed_connections) 202 if (0 < failed_connections)
215 { 203 {
@@ -287,19 +275,11 @@ run (void *cls, char *const *args, const char *cfgfile,
287 testing_cfg = GNUNET_CONFIGURATION_dup (cfg); 275 testing_cfg = GNUNET_CONFIGURATION_dup (cfg);
288 276
289 GNUNET_log_setup ("test_mesh_2dtorus", 277 GNUNET_log_setup ("test_mesh_2dtorus",
290#if VERBOSE
291 "DEBUG",
292#else
293 "WARNING", 278 "WARNING",
294#endif
295 NULL); 279 NULL);
296 280
297#if VERBOSE
298 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Starting daemons.\n");
299 GNUNET_CONFIGURATION_set_value_string (testing_cfg, "testing_old",
300 "use_progressbars", "YES");
301#endif
302 281
282 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Starting daemons.\n");
303 if (GNUNET_OK != 283 if (GNUNET_OK !=
304 GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing_old", 284 GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing_old",
305 "num_peers", &num_peers)) 285 "num_peers", &num_peers))
@@ -342,10 +322,6 @@ main (int argc, char *argv[])
342 argv[0], 322 argv[0],
343 "-c", 323 "-c",
344 "test_mesh_2dtorus.conf", 324 "test_mesh_2dtorus.conf",
345#if VERBOSE
346 "-L",
347 "DEBUG",
348#endif
349 NULL 325 NULL
350 }; 326 };
351 327