#include "platform.h"
#include "gnunet_testing_lib.h"
-#define VERBOSE GNUNET_YES
#define REMOVE_DIR GNUNET_YES
/**
"test: Shutdown of peers failed! (%s)\n", emsg);
ok--;
}
-#if VERBOSE
else
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"test: All peers successfully shut down!\n");
}
-#endif
+ GNUNET_CONFIGURATION_destroy (testing_cfg);
}
static void
shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
-#if VERBOSE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Ending test.\n");
-#endif
-
GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
- GNUNET_CONFIGURATION_destroy (testing_cfg);
}
if (disconnect_task != GNUNET_SCHEDULER_NO_TASK)
{
GNUNET_SCHEDULER_cancel (disconnect_task);
- GNUNET_SCHEDULER_add_now (&disconnect_peers, NULL);
+ disconnect_task = GNUNET_SCHEDULER_add_now (&disconnect_peers, NULL);
}
return;
}
GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
return;
}
-#if VERBOSE
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "************************************************************\n");
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "test: Peer Group started successfully!\n");
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Have %u connections\n",
+ "test: Peer Group started successfully with %u connections\n",
total_connections);
-#endif
-
peers_running = GNUNET_TESTING_daemons_running (pg);
if (0 < failed_connections)
{
testing_cfg = GNUNET_CONFIGURATION_dup (cfg);
GNUNET_log_setup ("test_mesh_2dtorus",
-#if VERBOSE
- "DEBUG",
-#else
"WARNING",
-#endif
NULL);
-#if VERBOSE
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Starting daemons.\n");
- GNUNET_CONFIGURATION_set_value_string (testing_cfg, "testing",
- "use_progressbars", "YES");
-#endif
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Starting daemons.\n");
if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing",
+ GNUNET_CONFIGURATION_get_value_number (testing_cfg, "testing_old",
"num_peers", &num_peers))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
hosts);
GNUNET_assert (pg != NULL);
shutdown_handle =
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_get_forever (),
+ GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
&shutdown_task, NULL);
}
argv[0],
"-c",
"test_mesh_2dtorus.conf",
-#if VERBOSE
- "-L",
- "DEBUG",
-#endif
NULL
};