#include "platform.h"
#include "gnunet_util_lib.h"
#include "gnunet_testing_lib.h"
#include "gnunet_testbed_lib.h"
#include "gnunet_testing_testbed_lib.h"
Go to the source code of this file.
Data Structures | |
struct | TestSystemState |
Struct to hold information for callbacks. More... | |
Macros | |
#define | BASE_DIR "testdir" |
Functions | |
static void | system_create_run (void *cls, struct GNUNET_TESTING_Interpreter *is) |
The run method of this cmd will setup a test environment for a node. More... | |
static int | system_create_traits (void *cls, const void **ret, const char *trait, unsigned int index) |
This function prepares an array with traits. More... | |
static void | system_create_cleanup (void *cls) |
The cleanup function of this cmd frees resources the cmd allocated. More... | |
struct GNUNET_TESTING_Command | GNUNET_TESTBED_cmd_system_create (const char *label, const char *my_node_id) |
This command is setting up a test environment for a peer to start. More... | |
#define BASE_DIR "testdir" |
Definition at line 32 of file testbed_api_cmd_system_create.c.
|
static |
The run method of this cmd will setup a test environment for a node.
Definition at line 51 of file testbed_api_cmd_system_create.c.
References GNUNET_TESTBED_system_create(), TestSystemState::test_system, and TestSystemState::testdir.
Referenced by GNUNET_TESTBED_cmd_system_create().
|
static |
This function prepares an array with traits.
Definition at line 67 of file testbed_api_cmd_system_create.c.
References GNUNET_TESTING_get_trait(), GNUNET_TESTING_TESTBED_make_trait_test_system(), GNUNET_TESTING_trait_end(), GNUNET_TESTING_Trait::index, ret, TestSystemState::test_system, and traits().
Referenced by GNUNET_TESTBED_cmd_system_create().
|
static |
The cleanup function of this cmd frees resources the cmd allocated.
Definition at line 91 of file testbed_api_cmd_system_create.c.
References GNUNET_free, GNUNET_TESTBED_system_destroy(), GNUNET_YES, and TestSystemState::test_system.
Referenced by GNUNET_TESTBED_cmd_system_create().
struct GNUNET_TESTING_Command GNUNET_TESTBED_cmd_system_create | ( | const char * | label, |
const char * | my_node_id | ||
) |
This command is setting up a test environment for a peer to start.
label | Name for command. |
my_node_id | The specific id of the node this command is running on. A sub string of the id is the process id of the master process. This id is used to build the name of the temporary directory of the peer to start. |
Definition at line 111 of file testbed_api_cmd_system_create.c.
References BASE_DIR, GNUNET_asprintf(), GNUNET_new, GNUNET_TESTING_command_new, my_node_id, system_create_cleanup(), system_create_run(), system_create_traits(), and TestSystemState::testdir.