aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing.c')
-rw-r--r--src/testing/testing.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/testing/testing.c b/src/testing/testing.c
index d3acd4689..4d9b7c0cb 100644
--- a/src/testing/testing.c
+++ b/src/testing/testing.c
@@ -34,6 +34,7 @@
34#include "gnunet_arm_service.h" 34#include "gnunet_arm_service.h"
35#include "gnunet_testing_lib.h" 35#include "gnunet_testing_lib.h"
36#include "gnunet_testing_ng_lib.h" 36#include "gnunet_testing_ng_lib.h"
37#include "testing_cmds.h"
37 38
38#define LOG(kind, ...) GNUNET_log_from (kind, "testing-api", __VA_ARGS__) 39#define LOG(kind, ...) GNUNET_log_from (kind, "testing-api", __VA_ARGS__)
39 40
@@ -2259,6 +2260,31 @@ GNUNET_TESTING_get_address (struct GNUNET_TESTING_NodeConnection *connection,
2259 2260
2260 2261
2261/** 2262/**
2263 * Create a GNUNET_CMDS_LOCAL_FINISHED message.
2264 *
2265 * @param rv The result of the local test as GNUNET_GenericReturnValue.
2266 * @return The GNUNET_CMDS_LOCAL_FINISHED message.
2267*/
2268struct GNUNET_MessageHeader *
2269GNUNET_TESTING_send_local_test_finished_msg (enum GNUNET_GenericReturnValue rv)
2270{
2271 struct GNUNET_CMDS_LOCAL_FINISHED *reply;
2272 size_t msg_length;
2273
2274 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2275 "Local test exits with status %d\n",
2276 rv);
2277 msg_length = sizeof(struct GNUNET_CMDS_LOCAL_FINISHED);
2278 reply = GNUNET_new (struct GNUNET_CMDS_LOCAL_FINISHED);
2279 reply->header.type = htons (GNUNET_MESSAGE_TYPE_CMDS_HELPER_LOCAL_FINISHED);
2280 reply->header.size = htons ((uint16_t) msg_length);
2281 reply->result = htons (rv);
2282
2283 return (struct GNUNET_MessageHeader *) reply;
2284}
2285
2286
2287/**
2262 * Getting the topology from file. 2288 * Getting the topology from file.
2263 * 2289 *
2264 * @param filename The name of the topology file. 2290 * @param filename The name of the topology file.