aboutsummaryrefslogtreecommitdiff
path: root/src/testing/test_testing_topology.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/test_testing_topology.c')
-rw-r--r--src/testing/test_testing_topology.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/testing/test_testing_topology.c b/src/testing/test_testing_topology.c
index 2006cc468..446cd4dfb 100644
--- a/src/testing/test_testing_topology.c
+++ b/src/testing/test_testing_topology.c
@@ -25,7 +25,7 @@
25#include "gnunet_testing_lib.h" 25#include "gnunet_testing_lib.h"
26#include "gnunet_core_service.h" 26#include "gnunet_core_service.h"
27 27
28#define VERBOSE GNUNET_YES 28#define VERBOSE GNUNET_NO
29 29
30/** 30/**
31 * How long until we fail the whole testcase? 31 * How long until we fail the whole testcase?
@@ -81,6 +81,8 @@ static int transmit_ready_failed;
81 81
82static int transmit_ready_called; 82static int transmit_ready_called;
83 83
84static enum GNUNET_TESTING_Topology topology;
85
84#define MTYPE 12345 86#define MTYPE 12345
85 87
86struct GNUNET_TestMessage 88struct GNUNET_TestMessage
@@ -518,7 +520,7 @@ create_topology ()
518 maybe this way is best so that the client can know both 520 maybe this way is best so that the client can know both
519 when peers are started, and when they are connected. 521 when peers are started, and when they are connected.
520 */ 522 */
521 expected_connections = GNUNET_TESTING_create_topology (pg); 523 expected_connections = GNUNET_TESTING_create_topology (pg, topology);
522#if VERBOSE 524#if VERBOSE
523 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 525 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
524 "Have %d expected connections\n", expected_connections); 526 "Have %d expected connections\n", expected_connections);
@@ -575,6 +577,7 @@ run (void *cls,
575 char *const *args, 577 char *const *args,
576 const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg) 578 const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg)
577{ 579{
580 unsigned long long topology_num;
578 sched = s; 581 sched = s;
579 ok = 1; 582 ok = 1;
580 583
@@ -588,6 +591,12 @@ run (void *cls,
588 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 591 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
589 "Starting daemons based on config file %s\n", cfgfile); 592 "Starting daemons based on config file %s\n", cfgfile);
590#endif 593#endif
594
595 if (GNUNET_YES ==
596 GNUNET_CONFIGURATION_get_value_number (cfg, "testing", "topology",
597 &topology_num))
598 topology = topology_num;
599
591 if (GNUNET_SYSERR == 600 if (GNUNET_SYSERR ==
592 GNUNET_CONFIGURATION_get_value_number (cfg, "testing", "num_peers", 601 GNUNET_CONFIGURATION_get_value_number (cfg, "testing", "num_peers",
593 &num_peers)) 602 &num_peers))