diff options
Diffstat (limited to 'src/include/gnunet_testing_netjail_lib.h')
-rw-r--r-- | src/include/gnunet_testing_netjail_lib.h | 49 |
1 files changed, 45 insertions, 4 deletions
diff --git a/src/include/gnunet_testing_netjail_lib.h b/src/include/gnunet_testing_netjail_lib.h index 3fbb88dd0..ea44e030d 100644 --- a/src/include/gnunet_testing_netjail_lib.h +++ b/src/include/gnunet_testing_netjail_lib.h | |||
@@ -320,7 +320,36 @@ unsigned int | |||
320 | GNUNET_TESTING_calculate_num (struct | 320 | GNUNET_TESTING_calculate_num (struct |
321 | GNUNET_TESTING_NodeConnection *node_connection, | 321 | GNUNET_TESTING_NodeConnection *node_connection, |
322 | struct GNUNET_TESTING_NetjailTopology *topology); | 322 | struct GNUNET_TESTING_NetjailTopology *topology); |
323 | struct TestState | ||
324 | { | ||
325 | /** | ||
326 | * Callback to write messages to the master loop. | ||
327 | * | ||
328 | */ | ||
329 | TESTING_CMD_HELPER_write_cb write_message; | ||
330 | |||
331 | /** | ||
332 | * Callback to notify the helper test case has finished. | ||
333 | */ | ||
334 | TESTING_CMD_HELPER_finish_cb finished_cb; | ||
323 | 335 | ||
336 | /** | ||
337 | * The name for a specific test environment directory. | ||
338 | * | ||
339 | */ | ||
340 | char *testdir; | ||
341 | |||
342 | /** | ||
343 | * The name for the configuration file of the specific node. | ||
344 | * | ||
345 | */ | ||
346 | char *cfgname; | ||
347 | |||
348 | /** | ||
349 | * The complete topology information. | ||
350 | */ | ||
351 | struct GNUNET_TESTING_NetjailTopology *topology; | ||
352 | }; | ||
324 | 353 | ||
325 | /** | 354 | /** |
326 | * Struct with information for callbacks. | 355 | * Struct with information for callbacks. |
@@ -362,7 +391,14 @@ struct LocalPreparedState | |||
362 | TESTING_CMD_HELPER_write_cb write_message; | 391 | TESTING_CMD_HELPER_write_cb write_message; |
363 | }; | 392 | }; |
364 | 393 | ||
365 | 394 | /** | |
395 | * Create command. | ||
396 | * | ||
397 | * @param label name for command. | ||
398 | * @param create_label Label of the cmd which started the test system. | ||
399 | * @param write_message Callback to write messages to the master loop. | ||
400 | * @return command. | ||
401 | */ | ||
366 | struct GNUNET_TESTING_Command | 402 | struct GNUNET_TESTING_Command |
367 | GNUNET_TESTING_cmd_system_destroy (const char *label, | 403 | GNUNET_TESTING_cmd_system_destroy (const char *label, |
368 | const char *create_label); | 404 | const char *create_label); |
@@ -438,11 +474,10 @@ GNUNET_TESTING_cmd_stop_testing_system ( | |||
438 | /** | 474 | /** |
439 | * Create a GNUNET_CMDS_LOCAL_FINISHED message. | 475 | * Create a GNUNET_CMDS_LOCAL_FINISHED message. |
440 | * | 476 | * |
441 | * @param rv The result of the local test as GNUNET_GenericReturnValue. | ||
442 | * @return The GNUNET_CMDS_LOCAL_FINISHED message. | 477 | * @return The GNUNET_CMDS_LOCAL_FINISHED message. |
443 | */ | 478 | */ |
444 | struct GNUNET_MessageHeader * | 479 | struct GNUNET_MessageHeader * |
445 | GNUNET_TESTING_send_local_test_finished_msg (enum GNUNET_GenericReturnValue rv); | 480 | GNUNET_TESTING_send_local_test_finished_msg (); |
446 | 481 | ||
447 | 482 | ||
448 | struct GNUNET_TESTING_Command | 483 | struct GNUNET_TESTING_Command |
@@ -482,7 +517,13 @@ struct GNUNET_TESTING_Command | |||
482 | GNUNET_TESTING_cmd_block_until_external_trigger ( | 517 | GNUNET_TESTING_cmd_block_until_external_trigger ( |
483 | const char *label); | 518 | const char *label); |
484 | 519 | ||
485 | 520 | /** | |
521 | * Create command. | ||
522 | * | ||
523 | * @param label name for command. | ||
524 | * @param write_message Callback to write messages to the master loop. | ||
525 | * @return command. | ||
526 | */ | ||
486 | struct GNUNET_TESTING_Command | 527 | struct GNUNET_TESTING_Command |
487 | GNUNET_TESTING_cmd_send_peer_ready (const char *label, | 528 | GNUNET_TESTING_cmd_send_peer_ready (const char *label, |
488 | TESTING_CMD_HELPER_write_cb write_message); | 529 | TESTING_CMD_HELPER_write_cb write_message); |