Go to the source code of this file.
Functions | |
struct GNUNET_TESTING_Command | GNUNET_TESTING_command_new_ac (void *cls, const char *label, GNUNET_TESTING_CommandRunRoutine run, GNUNET_TESTING_CommandCleanupRoutine cleanup, GNUNET_TESTING_CommandGetTraits traits, struct GNUNET_TESTING_AsyncContext *ac) |
Create a new command that may be asynchronous. More... | |
void | GNUNET_TESTING_set_label (struct GNUNET_TESTING_CommandLabel *label, const char *value) |
Set label to value. More... | |
struct GNUNET_TESTING_Command | GNUNET_TESTING_cmd_set_var (const char *name, struct GNUNET_TESTING_Command cmd) |
Set variable to command as side-effect of running a command. More... | |
struct GNUNET_TESTING_Command | GNUNET_TESTING_cmd_end (void) |
Create command array terminator. More... | |
struct GNUNET_TESTING_Command GNUNET_TESTING_command_new_ac | ( | void * | cls, |
const char * | label, | ||
GNUNET_TESTING_CommandRunRoutine | run, | ||
GNUNET_TESTING_CommandCleanupRoutine | cleanup, | ||
GNUNET_TESTING_CommandGetTraits | traits, | ||
struct GNUNET_TESTING_AsyncContext * | ac | ||
) |
Create a new command that may be asynchronous.
cls | the closure |
label | the Label. Maximum length is GNUNET_TESTING_CMD_MAX_LABEL_LENGTH |
run | the run routing |
cleanup | the cleanup function |
traits | the traits function (optional) |
ac | the async context, NULL if command is always synchronous |
Definition at line 34 of file testing_api_cmds.c.
References GNUNET_TESTING_Command::ac, cleanup(), GNUNET_TESTING_Command::cls, GNUNET_assert, GNUNET_TESTING_set_label(), GNUNET_TESTING_Command::label, run(), and traits().
Referenced by GNUNET_CORE_cmd_connect_peers(), GNUNET_TESTING_ARM_cmd_start_peer(), GNUNET_TESTING_cmd_barrier_reached(), GNUNET_TESTING_cmd_exec(), GNUNET_TESTING_cmd_exec_va(), GNUNET_TESTING_cmd_finish(), GNUNET_TESTING_cmd_load_topology_from_file(), GNUNET_TESTING_cmd_load_topology_from_string(), GNUNET_TESTING_cmd_netjail_setup(), GNUNET_TESTING_cmd_netjail_start_helpers(), GNUNET_TESTING_cmd_stop_peer(), GNUNET_TRANSPORT_cmd_backchannel_check(), GNUNET_TRANSPORT_cmd_connect_peers(), GNUNET_TRANSPORT_cmd_send_simple_performance(), and GNUNET_TRANSPORT_cmd_start_peer().
void GNUNET_TESTING_set_label | ( | struct GNUNET_TESTING_CommandLabel * | label, |
const char * | value | ||
) |
Set label to value.
Asserts that value is not longer than GNUNET_TESTING_CMD_MAX_LABEL_LENGTH.
[out] | label | label to initialize |
value | value to store into label |
Definition at line 59 of file testing_api_cmds.c.
References GNUNET_assert, GNUNET_TESTING_CMD_MAX_LABEL_LENGTH, GNUNET_TESTING_Command::label, value, and GNUNET_TESTING_CommandLabel::value.
Referenced by GNUNET_TESTING_cmd_batch(), GNUNET_TESTING_command_new_ac(), and GNUNET_TESTING_DHTU_cmd_send().
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_set_var | ( | const char * | name, |
struct GNUNET_TESTING_Command | cmd | ||
) |
Set variable to command as side-effect of running a command.
name | name of the variable to set |
cmd | command to set to variable when run |
Definition at line 75 of file testing_api_cmds.c.
References GNUNET_TESTING_Command::name.
Referenced by start_testcase().
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_end | ( | void | ) |
Create command array terminator.
Definition at line 85 of file testing_api_cmds.c.
References GNUNET_TESTING_Command::run.
Referenced by main().