diff options
Diffstat (limited to 'src/testbed/plugin_testcmd.c')
-rw-r--r-- | src/testbed/plugin_testcmd.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/testbed/plugin_testcmd.c b/src/testbed/plugin_testcmd.c index 90e4a90a1..6f28e102d 100644 --- a/src/testbed/plugin_testcmd.c +++ b/src/testbed/plugin_testcmd.c | |||
@@ -26,21 +26,32 @@ | |||
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet_testing_ng_lib.h" | 27 | #include "gnunet_testing_ng_lib.h" |
28 | #include "gnunet_util_lib.h" | 28 | #include "gnunet_util_lib.h" |
29 | #include "gnunet_testing_plugin.h" | 29 | #include "gnunet_testbed_ng_service.h" |
30 | |||
31 | |||
32 | 30 | ||
31 | unsigned int are_all_peers_started; | ||
33 | 32 | ||
33 | static void | ||
34 | all_peers_started () | ||
35 | { | ||
36 | are_all_peers_started = GNUNET_YES; | ||
37 | } | ||
34 | 38 | ||
35 | static void | 39 | static void |
36 | start_testcase () | 40 | start_testcase (TESTBED_CMD_HELPER_write_cb write_message, char *router_ip, |
41 | char *node_ip) | ||
37 | { | 42 | { |
38 | struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get (); | 43 | struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get (); |
39 | 44 | ||
45 | are_all_peers_started = GNUNET_NO; | ||
46 | |||
40 | struct GNUNET_TESTING_Command commands[] = { | 47 | struct GNUNET_TESTING_Command commands[] = { |
41 | GNUNET_TESTING_cmd_hello_world_birth ("hello-world-birth-0", | 48 | GNUNET_TESTING_cmd_hello_world_birth ("hello-world-birth-0", |
42 | &now), | 49 | &now), |
43 | GNUNET_TESTING_cmd_hello_world ("hello-world-0","hello-world-birth-0",""), | 50 | GNUNET_TESTING_cmd_hello_world ("hello-world-0","hello-world-birth-0",""), |
51 | GNUNET_TESTING_cmd_send_peer_ready ("send-peer-ready-1", | ||
52 | write_message), | ||
53 | GNUNET_TESTING_cmd_block_until_all_peers_started ("block-1", | ||
54 | &are_all_peers_started), | ||
44 | GNUNET_TESTING_cmd_end () | 55 | GNUNET_TESTING_cmd_end () |
45 | }; | 56 | }; |
46 | 57 | ||