aboutsummaryrefslogtreecommitdiff
path: root/src/testing/test_testing_plugin_testcmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/test_testing_plugin_testcmd.c')
-rw-r--r--src/testing/test_testing_plugin_testcmd.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/testing/test_testing_plugin_testcmd.c b/src/testing/test_testing_plugin_testcmd.c
index 444272fcd..32e2b38a7 100644
--- a/src/testing/test_testing_plugin_testcmd.c
+++ b/src/testing/test_testing_plugin_testcmd.c
@@ -17,11 +17,12 @@
17 17
18 SPDX-License-Identifier: AGPL3.0-or-later 18 SPDX-License-Identifier: AGPL3.0-or-later
19 */ 19 */
20
21/** 20/**
22 * @file testbed/plugin_testcmd.c 21 * @file testbed/plugin_testcmd.c
23 * @brief a plugin to provide the API for running test cases. 22 * @brief a plugin to provide the API for running test cases.
24 * @author t3sserakt 23 * @author t3sserakt
24 *
25 * // FIXME: too verbose, no logic to return final status, will segv!
25 */ 26 */
26#include "platform.h" 27#include "platform.h"
27#include "gnunet_testing_ng_lib.h" 28#include "gnunet_testing_ng_lib.h"
@@ -33,8 +34,11 @@
33 */ 34 */
34#define LOG(kind, ...) GNUNET_log (kind, __VA_ARGS__) 35#define LOG(kind, ...) GNUNET_log (kind, __VA_ARGS__)
35 36
37
38// FIXME: bad global!
36unsigned int are_all_peers_started; 39unsigned int are_all_peers_started;
37 40
41
38static void 42static void
39all_peers_started () 43all_peers_started ()
40{ 44{
@@ -44,8 +48,10 @@ all_peers_started ()
44 are_all_peers_started); 48 are_all_peers_started);
45} 49}
46 50
51
47static void 52static void
48start_testcase (TESTING_CMD_HELPER_write_cb write_message, char *router_ip, 53start_testcase (TESTING_CMD_HELPER_write_cb write_message,
54 char *router_ip,
49 char *node_ip, 55 char *node_ip,
50 char *n, 56 char *n,
51 char *m, 57 char *m,
@@ -70,9 +76,10 @@ start_testcase (TESTING_CMD_HELPER_write_cb write_message, char *router_ip,
70 write_message) 76 write_message)
71 }; 77 };
72 78
73 GNUNET_TESTING_run (NULL, 79 GNUNET_TESTING_run (commands,
74 commands, 80 GNUNET_TIME_UNIT_FOREVER_REL,
75 GNUNET_TIME_UNIT_FOREVER_REL); 81 NULL, /* FIXME: pass continuation! */
82 NULL);
76 LOG (GNUNET_ERROR_TYPE_ERROR, 83 LOG (GNUNET_ERROR_TYPE_ERROR,
77 "We got here 7!\n"); 84 "We got here 7!\n");
78 85
@@ -113,4 +120,4 @@ libgnunet_plugin_testcmd_done (void *cls)
113} 120}
114 121
115 122
116/* end of plugin_testcmd.c */ 123