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.c30
1 files changed, 26 insertions, 4 deletions
diff --git a/src/testing/testing.c b/src/testing/testing.c
index a11d404a5..766c7b084 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
@@ -1961,10 +1962,6 @@ get_connect_value (char *line, struct GNUNET_TESTING_NetjailNode *node)
1961 } 1962 }
1962 1963
1963 GNUNET_free (copy); 1964 GNUNET_free (copy);
1964 LOG (GNUNET_ERROR_TYPE_ERROR,
1965 "address_prefix %s\n",
1966 prefix->address_prefix);
1967
1968 return node_connection; 1965 return node_connection;
1969} 1966}
1970 1967
@@ -2007,6 +2004,31 @@ node_connections (char *line, struct GNUNET_TESTING_NetjailNode *node)
2007 2004
2008 2005
2009/** 2006/**
2007 * Create a GNUNET_CMDS_LOCAL_FINISHED message.
2008 *
2009 * @param rv The result of the local test as GNUNET_GenericReturnValue.
2010 * @return The GNUNET_CMDS_LOCAL_FINISHED message.
2011*/
2012struct GNUNET_MessageHeader *
2013GNUNET_TESTING_send_local_test_finished_msg (enum GNUNET_GenericReturnValue rv)
2014{
2015 struct GNUNET_CMDS_LOCAL_FINISHED *reply;
2016 size_t msg_length;
2017
2018 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2019 "Local test exits with status %d\n",
2020 rv);
2021 msg_length = sizeof(struct GNUNET_CMDS_LOCAL_FINISHED);
2022 reply = GNUNET_new (struct GNUNET_CMDS_LOCAL_FINISHED);
2023 reply->header.type = htons (GNUNET_MESSAGE_TYPE_CMDS_HELPER_LOCAL_FINISHED);
2024 reply->header.size = htons ((uint16_t) msg_length);
2025 reply->result = htons (rv);
2026
2027 return (struct GNUNET_MessageHeader *) reply;
2028}
2029
2030
2031/**
2010 * Getting the topology from file. 2032 * Getting the topology from file.
2011 * 2033 *
2012 * @param filename The name of the topology file. 2034 * @param filename The name of the topology file.